Create PKGBUILD

merge-requests/64/head
Hugo Posnic 2016-12-17 15:13:18 +01:00
parent 6b18a9335f
commit 4993b96919
3 changed files with 33 additions and 3 deletions

View File

@ -0,0 +1,30 @@
pkgname=manjaro-hello
pkgver=1.0
pkgrel=1
pkgdesc="Manjaro Hello is a tool that helps the new user of Manjaro in the discovery of the system."
url="https://github.com/Huluti/$_pkgname"
arch=('any')
license=('GPL')
depends=('gtk3' 'python3')
makedepends=('git')
source=("$_pkgname::git+https://github.com/Huluti/$_pkgname")
md5sums=('SKIP')
package() {
cd "$srcdir/$_pkgname"
mkdir -p "${pkgdir}/usr/share/${_pkgname}"
cp -a data/* "${pkgdir}/usr/share/${_pkgname}"
cp -a 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/${_pkgname}.py" "${pkgdir}/usr/bin/${_pkgname}.py"
cd "po"
for lang in $(ls -1 | sed -e 's/\..*$//')
do
if [ $lang != "manjaro-hello" ]
then
mkdir -p $pkgdir/usr/share/locale/$lang/LC_MESSAGES
msgfmt -c -o "$pkgdir/usr/share/locale/$lg/LC_MESSAGES/$pkgname.mo" $lang.po
fi
done
}

View File

@ -6,4 +6,4 @@ StartupNotify=false
Name=Manjaro Hello Name=Manjaro Hello
Exec=/usr/bin/manjaro-hello.py Exec=/usr/bin/manjaro-hello.py
Icon=/usr/share/icons/manjaro.png Icon=/usr/share/icons/manjaro.png
Comment=The Manjaro Hello utility. Comment=Manjaro Hello is a tool that helps the new user of Manjaro in the discovery of the system.

View File

@ -31,9 +31,9 @@ class ManjaroHello():
# Path vars # Path vars
self.current_folder = os.getcwd() + "/" self.current_folder = os.getcwd() + "/"
if self.current_folder == "/usr/bin/": if self.current_folder == "/usr/bin/":
self.data_path = "/usr/share/" + self.app + "/data/" self.data_path = "/usr/share/" + self.app + "/"
self.locale_path = "/usr/share/locale/" self.locale_path = "/usr/share/locale/"
self.ui_path = "/usr/share/" + self.app + "/ui/" self.ui_path = "/usr/share/" + self.app + "/"
self.desktop_path = "/usr/share/applications/" + self.app + ".desktop" self.desktop_path = "/usr/share/applications/" + self.app + ".desktop"
else: else:
self.data_path = "../data/" self.data_path = "../data/"