diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..a114f9c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer: Artemis Dara +# PKGBUILD for uninews +pkgname=uninews +_pkgname=UniNews # github name +pkgver=0.1.0 +pkgrel=1 +pkgdesc="A small desktop application that brings together news and announcements from universities into a single place." +arch=('any') +url="https://github.com/open-source-uom/UniNews.git" +license=('GPL-3.0-or-later') +depends=( + 'python' + 'python-beautifulsoup4' + 'python-certifi' + 'python-charset-normalizer' + 'python-decorator' + 'python-feedparser' + 'python-idna' + 'python-markdown' + 'python-pyqt6' + 'python-requests' + 'python-sgmllib3k' + 'python-soupsieve' + 'python-typing_extensions' + 'python-urllib3' +) +makedepends=('python-setuptools' 'git' 'python-pip') +source=("git+https://github.com/open-source-uom/UniNews.git") +sha256sums=('SKIP') + + +prepare() { + # moves to src directory + cd "$srcdir/" + +} + + +pkgver() { + cd "$srcdir/$_pkgname" || return 1 + local version=$(git describe --long --tags 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g') + # check if the version is valid + if [ -z "$version" ]; then + echo "0.1.0" + else + echo "$version" + fi +} + +build() { + cd "$srcdir/$_pkgname" + python setup.py build +} + +package() { + cd "$srcdir/$_pkgname" + python setup.py install --root="$pkgdir" --optimize=1 + + # installing plyer + pip install --root="$pkgdir" --no-deps plyer + + # installing documentation + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE" 2>/dev/null || true + install -Dm644 README.md "$pkgdir/usr/share/doc/$_pkgname/README.md" 2>/dev/null || true + +} +