Skip to content

Instantly share code, notes, and snippets.

@glubsy glubsy/PKGBUILD forked from anonymous/PKGBUILD
Last active Sep 19, 2018

Embed
What would you like to do?
# Maintainer: Piotr Rogoża <rogoza dot piotr at gmail dot com>
# Contributor: Nathan O <ndowens.aur at gmail dot com>
# vim:set ts=2 sw=2 et ft=sh tw=100: expandtab
pkgname=diffimg
_pkgname=Diffimg
pkgver=2.2.0
pkgrel=1
pkgdesc="Simple image comparison tool"
arch=('i686' 'x86_64')
license=('GPL2')
depends=(qt4 qwt-qt4 opencv freeimage)
makedepends=(qt4 qwt-qt4 freeimage cmake)
url='http://sourceforge.net/projects/diffimg/'
source=(
"http://sourceforge.net/projects/diffimg/files/${pkgver}/${_pkgname}-${pkgver}-src.zip"
diffimg.desktop
)
install='diffimg.install'
prepare(){
echo "srcdir: ${srcdir}"
cd "${srcdir}"/${_pkgname}-${pkgver}-src
sed -i -e 's/\r//' \
-e 's/|/-print0 |/' \
-e "s#dos2unix#-0 sed -i 's|\\\r||'#" \
tounix.sh
sh ./tounix.sh
cd ./build
sed -i -e 's;\"\/usr\/include\/qwt\";\"\/usr\/include\/qwt\-qt4\";g' CMakeLists.txt
sed -i -e '178s;qwt;qwt\-qt4;g' CMakeLists.txt
sed -i -e '180s;qwt;qwt\-qt4;g' CMakeLists.txt
}
build() {
cd ${_pkgname}-${pkgver}-src/build
#qmake-qt4 -recursive INSTALL_PREFIX=/usr diffimg.pro
cmake -DCMAKE_INSTALL_PREFIX=$(pwd)/usr .
make
}
package() {
echo "package start pwd: $(pwd)"
install -Dm644 ../${pkgname}.desktop "${pkgdir}"/usr/share/applications/${pkgname}.desktop
cd ${_pkgname}-${pkgver}-src/build
echo "changing dir: $(pwd)"
#make DESTDIR="/usr/local" INSTALL_ROOT="${pkgdir}" install
make INSTALL_ROOT="${pkgdir}" install
# install -dm755 "$pkgdir"/usr/share/icons
# ln -s ../pixmaps/res/diffimg.ico "$pkgdir"/usr/share/icons/diffimg.ico
# fix conflicts with graphviz
# pkgdir is diffimg/pkg/diffimg/diffimg
install -Dm644 "$(pwd)"/usr/bin/${pkgname} "${pkgdir}"/usr/bin/${pkgname}
#cp "${pkgdir}"/usr/bin/${pkgname} "${pkgdir}"/usr/bin/${_pkgname}
#cp "${pkgdir}"/usr/share/man/man1/${pkgname}.1.gz "${pkgdir}"/usr/share/man/man1/${_pkgname}.1.gz
}
md5sums=('e97610c4a265524297bc20268870556a'
'1f924268b20847374b6b260f2b7f1f7d')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.