diff options
author | Stephen Gregoratto | 2019-03-14 12:09:24 +1100 |
---|---|---|
committer | Stephen Gregoratto | 2019-03-14 12:09:24 +1100 |
commit | dcb9fe7280ec4399658a13449fae40cfc350e6b7 (patch) | |
tree | a8414e0f4ebb77bb4b33bea4472eced793758812 /PKGBUILD | |
parent | 55f38c0c86a7152446a8f1d17af7bea810198c5a (diff) | |
download | aur-dcb9fe7280ec4399658a13449fae40cfc350e6b7.tar.gz |
Modify the mandoc package to create mandoc-cvs
This package uses some funky date detection for pkgver, which may not be
all that reliable. If there are problems, Yell them at me in the
comments.
Also changed the formatting/structure of the PKGBUILD, but not
completely.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 56 |
1 files changed, 36 insertions, 20 deletions
@@ -1,42 +1,58 @@ -# Maintainer: Jakub Klinkovský <j.l.k@gmx.com> +# Maintainer: Stephen Gregoratto <dev@sgregoratto.me> +# Contributor: Jakub Klinkovský <j.l.k@gmx.com> # Contributor: Matheus de Alcantara <matheus.de.alcantara@gmail.com> -pkgname=mandoc -pkgver=1.14.5 +pkgname=mandoc-cvs +pkgver=20190314 pkgrel=1 pkgdesc='A suite of tools compiling mdoc from the OpenBSD project' -arch=('i686' 'x86_64') -url='https://mdocml.bsd.lv/' license=('custom: ISC') +arch=('i686' 'x86_64' 'armv6h' 'armv7h') +url='https://mandoc.bsd.lv' depends=('zlib') +makedepends=('cvs' 'openssh') provides=('man') conflicts=('man') -source=("https://mdocml.bsd.lv/snapshots/$pkgname-$pkgver.tar.gz" - 'configure.local' +source=('configure.local' 'mandoc.service' 'mandoc.timer') -sha256sums=('8219b42cb56fc07b2aa660574e6211ac38eefdbf21f41b698d3348793ba5d8f7' - 'f0e8ddb61d063bec02a6a1f73f5d979bb548e7aabcf0a27c0d5c29c4194bfc8e' +sha256sums=('f0e8ddb61d063bec02a6a1f73f5d979bb548e7aabcf0a27c0d5c29c4194bfc8e' '2091411d5f87a3c371a5ba74b4773d1e454046446fa2cb045485979e52419bb6' '74d6a02b97a17fffddcc0a3dc830e811348b1f6c6b84f867882c776d50f00ea4') prepare() { - cp "$srcdir"/configure.local $pkgname-$pkgver + msg2 "Checking out sources using anonymous CVS over SSH." + msg2 "As of 2019-03, the fingerprint of mandoc.bsd.lv is zj94mkQU15j7Hh4YalZHbEO2m4jm2ZVW0cuva+OpKvg." + msg2 "Do NOT continue connecting if these do not match." + CVS_RSH=ssh cvs -d anoncvs@mandoc.bsd.lv:/cvs checkout -d "$pkgname" -P mandoc + cp "${srcdir}/configure.local" $pkgname +} + +pkgver() { + cd "$pkgname" + # CVS does not save the latest tag/revision of the tree. + # The only reliable way to get the latest version is to + # use the date of the last modified file. + # Exclude the CVS files as they are autogenerated. + lmod="$(find "$PWD" -type f -not -path "*CVS*" -exec stat -c '%Y' {} \; | sort -rn | sed 1q)" + date -d "@$lmod" "+%Y%m%d" } build() { - cd $pkgname-$pkgver - ./configure - make + cd $pkgname + ./configure + make } package() { - cd $pkgname-$pkgver - DESTDIR="$pkgdir" make install - install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + cd $pkgname + DESTDIR="$pkgdir" make install + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE - install -Dm644 "$srcdir"/mandoc.timer "$pkgdir"/usr/lib/systemd/system/mandoc.timer - install -Dm644 "$srcdir"/mandoc.service "$pkgdir"/usr/lib/systemd/system/mandoc.service - install -dm755 "$pkgdir"/usr/lib/systemd/system/multi-user.target.wants - ln -s ../mandoc.timer "$pkgdir"/usr/lib/systemd/system/multi-user.target.wants/mandoc.timer + install -Dm644 "$srcdir"/mandoc.timer "$pkgdir"/usr/lib/systemd/system/mandoc.timer + install -Dm644 "$srcdir"/mandoc.service "$pkgdir"/usr/lib/systemd/system/mandoc.service + install -dm755 "$pkgdir"/usr/lib/systemd/system/multi-user.target.wants + ln -s ../mandoc.timer "$pkgdir"/usr/lib/systemd/system/multi-user.target.wants/mandoc.timer } + +# vim: tw=0 |