From 70232a7d388b5186a16480c6298856b52212bcbd Mon Sep 17 00:00:00 2001 From: Hugo Posnic Date: Sun, 18 Dec 2016 17:09:29 +0100 Subject: [PATCH] Update PKGBUILD --- BUILD/PKGBUILD | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/BUILD/PKGBUILD b/BUILD/PKGBUILD index 9fc05fe..5824eab 100644 --- a/BUILD/PKGBUILD +++ b/BUILD/PKGBUILD @@ -1,29 +1,38 @@ -pkgname=manjaro-hello -pkgver=1.0 +_pkgname=manjaro-hello +pkgname=${_pkgname}-git +pkgver=0.1 pkgrel=1 pkgdesc="A tool that helps the new user of Manjaro in the discovery of the system." -url="https://github.com/Huluti/$pkgname" +url="https://github.com/Huluti/${_pkgname}" arch=('any') license=('GPL') depends=('gtk3' 'python3') makedepends=('git') -source=("$pkgname::git+https://github.com/Huluti/$pkgname") +replaces=('manjaro-hello') +provides=('manjaro-hello') +conflicts=('manjaro-hello') +source=("${_pkgname}::git+https://github.com/Huluti/${_pkgname}") md5sums=('SKIP') +pkgver() { + cd "${_pkgname}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + package() { - cd "$srcdir/$pkgname" - mkdir -p "${pkgdir}/usr/share/${pkgname}" - cp -r data "${pkgdir}/usr/share/${pkgname}" - cp -r ui "${pkgdir}/usr/share/${pkgname}" - install -D -m644 ${pkgname}.desktop ${pkgdir}/etc/skel/.config/autostart/${pkgname}.desktop - install -D -m644 ${pkgname}.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop - install -D -m755 "src/manjaro_hello.py" "${pkgdir}/usr/bin/manjaro-hello" + cd "${srcdir}/${_pkgname}" + mkdir -p "${pkgdir}/usr/share/${_pkgname}" + cp -r data "${pkgdir}/usr/share/${_pkgname}" + cp -r ui "${pkgdir}/usr/share/${_pkgname}" + install -D -m644 ${_pkgname}.desktop ${pkgdir}/etc/skel/.config/autostart/${_pkgname}.desktop + install -D -m644 ${_pkgname}.desktop ${pkgdir}/usr/share/applications/${_pkgname}.desktop + install -D -m755 "src/manjaro_hello.py" "${pkgdir}/usr/bin/${_pkgname}" cd "po" for lang in $(ls -1 | sed -e 's/\..*$//'); do - if [ $lang != "manjaro-hello" ] + if [ ${lang} != ${_pkgname} ] then - install -d -m755 $pkgdir/usr/share/locale/$lang/LC_MESSAGES - msgfmt -c -o "$pkgdir/usr/share/locale/$lang/LC_MESSAGES/$pkgname.mo" $lang.po + install -d -m755 ${pkgdir}/usr/share/locale/${lang}/LC_MESSAGES + msgfmt -c -o "${pkgdir}/usr/share/locale/${lang}/LC_MESSAGES/${_pkgname}.mo" ${lang}.po fi done }