Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -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

}

Loading