# vim:set ft=sh: # $Id: PKGBUILD 194176 2016-11-01 07:01:02Z idevolder $ # Maintainer (Arch): BlackIkeEagle # Contributor (Arch): (sirocco AT ngs.ru) # Maintainer: André Silva pkgbase=doublecmd _pkgbase=$pkgbase-libre pkgname=("$pkgbase-gtk2" "$pkgbase-qt") pkgver=0.7.6 _helpver=0.6.0 pkgrel=1.parabola1 url="http://$pkgbase.sourceforge.net/" arch=('i686' 'x86_64') license=('GPL') provides=("$pkgbase") makedepends=('lazarus' 'qt4pas' 'gtk2') optdepends=( 'lua51: scripting' 'p7zip: support for 7zip archives' ) mksource=( "http://downloads.sourceforge.net/project/$pkgbase/Double%20Commander%20Source/$pkgbase-$pkgver-src.tar.gz" ) source=( "https://repo.parabola.nu/other/$_pkgbase/$_pkgbase-$pkgver-src.tar.gz" "http://downloads.sourceforge.net/project/$pkgbase/Double%20Commander%20Source/$pkgbase-help-$_helpver-src.tar.gz" "http://www.herecura.be/files/lazarus-20140321-2.tar.gz" 'libre.patch' 'help-libre.patch' ) mksha256sums=('e6f9e2230c44a83ae66cf96636fae58b8a1799abacfbcea85ffcbafc359b64d5') sha256sums=('8191c95af2a6716b75c3da1ef30ce3981ee8a1b9fa3e82f0f85b8c90e9ed9fcc' 'd50a58f0e8c25c07720f2afd987213f330dfce268e2aef349d1da3de2eef1c39' '16560ad7403ffbee1800384768828e1fad924d03068c6248b68a78c393fc4e20' 'a23303f1719be08a59038ce7a256d582868cdd3e19cda2537c4a23d3480a40f9' '62bc9fd628ca8dc11446f2f3b44ebf86bbf1776a7e8def11fbeb77589e9a5a6e') mksource() { cd "$pkgbase-$pkgver" msg2 'remove nonfree unRAR utility files from the source' rm -rv install/linux/deb/libunrar } prepare() { cd "$pkgbase-$pkgver" sed -e 's/LIB_SUFFIX=.*/LIB_SUFFIX=/g' -i install/linux/install.sh msg2 'remove nonfree libunrar, unace, unarj support and references' rm -rv plugins/wcx/unrar rm -v install/linux/rpm/libunrar.spec rm -v install/darwin/make-unrar.sh patch -Np1 -i ../libre.patch cd "$srcdir/$pkgbase-help-$_helpver" msg2 'remove nonfree libunrar, unace, unarj support and references on the help' patch -Np1 -i ../help-libre.patch cd "$srcdir" cp -a "$pkgbase-$pkgver" "$pkgbase-gtk" cp -a "$pkgbase-$pkgver" "$pkgbase-qt" } build() { msg2 'build gtk' gtkdir="$srcdir/$pkgbase-gtk" cd "$gtkdir" bsdtar -zxf "$srcdir/lazarus-20140321-2.tar.gz" sed -e "s/\\(export\\ lazbuild=\\).*/\\1\"\$(which lazbuild) --primary-config-path=${gtkdir//\//\\\/}\/lazarus\/lazarus-$CARCH\"/" -i build.sh sed -e "s/%%SRCDIR%%/${gtkdir//\//\\\/}/g" -i lazarus/packagefiles.xml ./build.sh beta gtk2 msg2 'build qt' qtdir="$srcdir/$pkgbase-qt" cd "$qtdir" bsdtar -zxf "$srcdir/lazarus-20140321-2.tar.gz" sed -e "s/\\(export\\ lazbuild=\\).*/\\1\"\$(which lazbuild) --primary-config-path=${qtdir//\//\\\/}\/lazarus\/lazarus-$CARCH\"/" -i build.sh sed -e "s/%%SRCDIR%%/${qtdir//\//\\\/}/g" -i lazarus/packagefiles.xml ./build.sh beta qt } package_doublecmd-gtk2() { pkgdesc="twin-panel (commander-style) file manager (GTK), without nonfree decompression engine for RAR archives and support for nonfree unace and unarj" depends=('gtk2' 'desktop-file-utils' 'hicolor-icon-theme' 'shared-mime-info') conflicts=("$pkgbase-qt" "$_pkgbase-gtk2" "$pkgbase-gtk2-libre") replaces=("$_pkgbase-gtk2" "$pkgbase-gtk2-libre") provides=("$pkgbase-gtk2-libre") cd "$srcdir/$pkgbase-gtk" ./install/linux/install.sh --install-prefix="$pkgdir" # install doc cd "$srcdir/$pkgbase-help-$_helpver" cp -a * "$pkgdir/usr/share/$pkgbase/doc/" } package_doublecmd-qt() { pkgdesc="twin-panel (commander-style) file manager (QT), without nonfree decompression engine for RAR archives and support for nonfree unace and unarj" depends=('qt4pas' 'desktop-file-utils' 'hicolor-icon-theme' 'shared-mime-info') conflicts=("$pkgbase-gtk2" "$_pkgbase-qt" "$pkgbase-qt-libre") replaces=("$_pkgbase-qt" "$pkgbase-qt-libre") provides=("$pkgbase-qt-libre") cd "$srcdir/$pkgbase-qt" ./install/linux/install.sh --install-prefix="$pkgdir" # install doc cd "$srcdir/$pkgbase-help-$_helpver" cp -a * "$pkgdir/usr/share/$pkgbase/doc/" }