summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2020-03-14 16:13:26 +0300
committerCaleb Maclennan2020-03-14 16:32:36 +0300
commit5479f7c99203a7e00d4a51254b39f64059716b29 (patch)
tree1c5e3147475dbd96eadab548a484bcf2bdefee65
parent4467c0d4c50b76bc05248f83130bfb4d22019d41 (diff)
downloadaur-5479f7c99203a7e00d4a51254b39f64059716b29.tar.gz
Overhaul packaging with Arch guidelines in mind
* Use pkgver with a semantic counter since the last stable tag. Counter is prefixed with "r" to be clear where upstream version tagging leaves off and counter comes in. The previous iteration without prefix was potentially ambiguous in the event upstream ever made a patch release. Git's describe uses different delimiters (-) but since those are invalid in pkgver the "r" prefix is recommended. * Order fields per wiki example. * Add provides for packaged SO name. * Remove depends that are either not actually required. Note: - libutil-linux is required by base (via systemd) which is required to have an Arch system (except in weird cases like Docker and nspawn where it is not, in which case this package also won't require it!). - Likewise gcc-libs is not actually a dependency but would have been a makedepends, except that is is part of base-devel which is assumed for all package builds. * Add makedepends on cmake which is not part of base-devel. * Quote shell variables using `shellharden`, not technically required and not even always my favorite style, but a good way to check for mistakes and grantee consistency.
-rw-r--r--.SRCINFO12
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD39
3 files changed, 31 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c6c2b0e6481c..3b3b220586af 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,19 @@
pkgbase = biblesync-git
pkgdesc = multicast shared co-navigation library for Bible programs
- pkgver = 2.0.1.1.gb16df42
+ pkgver = 2.0.1.r1.gb16df42
pkgrel = 1
epoch = 1
url = https://github.com/karlkleinpaste/biblesync
- arch = i686
arch = x86_64
+ arch = i686
license = GPL
+ makedepends = cmake
makedepends = git
- depends = gcc-libs
- depends = libutil-linux
- provides = biblesync=2.0.1.1.gb16df42
+ provides = biblesync=2.0.1.r1.gb16df42
+ provides = libbiblesync.so=2.0.1
conflicts = biblesync
source = git+https://github.com/karlkleinpaste/biblesync.git
- md5sums = SKIP
+ sha256sums = SKIP
pkgname = biblesync-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..0ca50ff4dd97
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!./.SRCINFO
+!./.gitignore
+!./PKGBUILD
diff --git a/PKGBUILD b/PKGBUILD
index 7931fae93aae..2a84d6f5755f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,38 @@
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
+# Maintainer: Caleb Maclennan <caleb@alerque.com>
pkgname=biblesync-git
-epoch=1
-pkgver=2.0.1.1.gb16df42
+pkgver=2.0.1.r1.gb16df42
pkgrel=1
-pkgdesc="multicast shared co-navigation library for Bible programs"
-arch=('i686' 'x86_64')
-url=https://github.com/karlkleinpaste/biblesync""
+epoch=1
+pkgdesc='multicast shared co-navigation library for Bible programs'
+arch=('x86_64' 'i686')
+url='https://github.com/karlkleinpaste/biblesync'
license=('GPL')
-depends=('gcc-libs' 'libutil-linux')
-makedepends=('git')
-provides=("biblesync=$pkgver")
-conflicts=("biblesync")
-source=("git+https://github.com/karlkleinpaste/biblesync.git")
-md5sums=('SKIP')
-_gitname="biblesync"
+makedepends=('cmake' 'git')
+provides=("${pkgname%-git}=$pkgver" "libbiblesync.so=${pkgver%.r*}")
+conflicts=("${pkgname%-git}")
+source=("git+$url.git")
+sha256sums=('SKIP')
pkgver() {
- cd ${pkgname%-git}
- git describe --long --tags | tr - .
+ cd "${pkgname%-git}"
+ git describe --tags --abbrev=7 HEAD | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
- cd ${pkgname%-git}
- [[ -d build ]] || mkdir build
+ cd "${pkgname%-git}"
+ mkdir -p build
cd build
- cmake -DBUILD_SHARED_LIBS=TRUE -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=/usr/lib ..
+ cmake \
+ -DBUILD_SHARED_LIBS=TRUE \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIBDIR=/usr/lib \
+ ../
make
}
package() {
- cd ${pkgname%-git}/build
+ cd "${pkgname%-git}/build"
make DESTDIR="$pkgdir/" install
}