aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--solar-python/PKGBUILD27
-rw-r--r--solar-python/solar-python.install20
l---------solar-python/upload1
3 files changed, 48 insertions, 0 deletions
diff --git a/solar-python/PKGBUILD b/solar-python/PKGBUILD
new file mode 100644
index 0000000..39adbc7
--- /dev/null
+++ b/solar-python/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@member.fsf.org>
+
+pkgname=solar-python
+pkgver=2.4
+pkgrel=1
+pkgdesc="Solar data calculation and prediction library for Python"
+arch=(any)
+url="https://github.com/maandree/solar-python"
+license=('AGPL3')
+depends=(python3)
+makedepends=(make coreutils python3 texinfo)
+install=solar-python.install
+source=($url/archive/$pkgver.tar.gz)
+sha256sums=(fda9576e26d4e46989d36cfba0208bf7167a063c4f5b62cf9c7f9a0bfacfb740)
+
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make PREFIX=/usr PY_MAJOR="$(python -V | cut -d ' ' -f 2 | cut -d . -f 1)" PY_MINOR="$(python -V | cut -d ' ' -f 2 | cut -d . -f 2)"
+}
+
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make PREFIX=/usr PY_MAJOR="$(python -V | cut -d ' ' -f 2 | cut -d . -f 1)" PY_MINOR="$(python -V | cut -d ' ' -f 2 | cut -d . -f 2)" install DESTDIR="$pkgdir"
+}
+
diff --git a/solar-python/solar-python.install b/solar-python/solar-python.install
new file mode 100644
index 0000000..0227091
--- /dev/null
+++ b/solar-python/solar-python.install
@@ -0,0 +1,20 @@
+_file="solar-python"
+
+infodir="usr/share/info"
+file="${_file}.info"
+
+
+post_install() {
+ [[ -x "usr/bin/install-info" ]] || return 0
+ install-info -- "${infodir}/${file}" "${infodir}/dir" 2> /dev/null
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+pre_remove() {
+ [[ -x "usr/bin/install-info" ]] || return 0
+ install-info --delete -- "${infodir}/${file}" "${infodir}/dir" 2> /dev/null
+}
+
diff --git a/solar-python/upload b/solar-python/upload
new file mode 120000
index 0000000..1e7a8be
--- /dev/null
+++ b/solar-python/upload
@@ -0,0 +1 @@
+../upload \ No newline at end of file