diff options
author | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2014-08-27 02:24:33 -0300 |
---|---|---|
committer | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2014-08-27 02:24:33 -0300 |
commit | 65186dddd44d6749af61a22f9ac266324b41ebc0 (patch) | |
tree | 9c218da0c5eef967065a0d7402d6e4d793b4f787 /libre | |
parent | 1c29d9115a23282417899a54c8b090a6efdac693 (diff) | |
parent | 02e4f36cef05a549eb7e553db98647de7552fac8 (diff) |
Merge branch 'master' of ssh://lukeshu.com:1863/srv/git/mirror/parabola/abslibre
Diffstat (limited to 'libre')
-rw-r--r-- | libre/your-freedom/PKGBUILD | 6 | ||||
-rw-r--r-- | libre/your-freedom_emu/PKGBUILD | 42 | ||||
-rw-r--r-- | libre/your-freedom_emu/post-receive-hook.sh | 56 |
3 files changed, 84 insertions, 20 deletions
diff --git a/libre/your-freedom/PKGBUILD b/libre/your-freedom/PKGBUILD index 96ee5047c..44e5e314b 100644 --- a/libre/your-freedom/PKGBUILD +++ b/libre/your-freedom/PKGBUILD @@ -5,8 +5,8 @@ pkgdesc="This package conflicts with every nonfree package known to date to ensu license=('GPL3') #url="https://projects.parabolagnulinux.org/blacklist.git" url="https://lukeshu.com/git/mirror/parabola/blacklist.git" -pkgver=20140824 -_gitver=8f7fa8c6c7a4b97b7804d523b250423004444815 +pkgver=20140827.1 +_gitver=5575cf1f075adc00652d6c9aad01369e1410d8fb pkgrel=1 arch=('any') @@ -16,7 +16,7 @@ install=${pkgname}.install makedepends=(librelib) #source=(blacklist-${_gitver}.txt::https://projects.parabolagnulinux.org/blacklist.git/plain/blacklist.txt?id=${_gitver}) source=(blacklist-${_gitver}.txt::https://lukeshu.com/git/mirror/parabola/blacklist.git/plain/blacklist.txt?id=${_gitver}) -md5sums=('5fb3ef4347dc04f255b6a3ceb3e32068') +md5sums=('4ab2276e3fe204e2876e26714f22baf3') package() { cd "$srcdir" diff --git a/libre/your-freedom_emu/PKGBUILD b/libre/your-freedom_emu/PKGBUILD index 30ace4a38..8b289cd94 100644 --- a/libre/your-freedom_emu/PKGBUILD +++ b/libre/your-freedom_emu/PKGBUILD @@ -1,24 +1,32 @@ -# Maintainer: Parabola Project <dev@list.parabolagnulinux.org> +# Maintainer: Parabola Project <dev@lists.parabolagnulinux.org> + pkgname=your-freedom_emu -pkgver=$(LC_ALL=C date -u +%Y%m%d) -pkgrel=1 pkgdesc="This package removes hardware emulators that emulate technically free games and/or OS (but only there are nonfree games and/or OS)." -arch=('any') -url="https://parabolagnulinux.org" license=('GPL3') +#url="https://projects.parabolagnulinux.org/blacklist.git" +url="https://lukeshu.com/git/mirror/parabola/blacklist.git" +pkgver=20140827.1 +_gitver=e2410d7936cac105a8af764a2bf771fdcffed4c7 +pkgrel=1 + +arch=('any') install=${pkgname}.install -source=(${pkgname}-blacklist-${pkgver}.txt::https://projects.parabolagnulinux.org/blacklist.git/plain/${pkgname}-blacklist.txt) + +makedepends=(librelib) +#source=(blacklist-${_gitver}.txt::https://projects.parabolagnulinux.org/blacklist.git/plain/${pkgname}-blacklist.txt?id=${_gitver}) +source=(blacklist-${_gitver}.txt::https://lukeshu.com/git/mirror/parabola/blacklist.git/plain/${pkgname}-blacklist.txt?id=${_gitver}) +md5sums=('cf6c392395891ada2fa08970fc5430ef') package() { - conflicts=($(cut -d: -f1,2 ${pkgname}-blacklist-${pkgver}.txt | \ - sed "s/:$//" | \ - grep -v ":" | \ - grep -v '^#' | \ - sort -u - )) - cd ${srcdir} - install -d ${pkgdir}/usr/share/doc/${pkgname} - install -m644 ${pkgname}-blacklist-${pkgver}.txt ${pkgdir}/usr/share/doc/${pkgname}/ -} + cd "$srcdir" -md5sums=('d3c2fad6dd774c5234d42d4953d09611') + conflicts=($( + < blacklist-${_gitver}.txt \ + libreblacklist normalize | + cut -d: -f1,2 | + sed -n 's/:$//p' | + sort -u + )) + + install -Dm644 blacklist-${_gitver}.txt "$pkgdir"/usr/share/doc/${pkgname}/blacklist.txt +} diff --git a/libre/your-freedom_emu/post-receive-hook.sh b/libre/your-freedom_emu/post-receive-hook.sh new file mode 100644 index 000000000..bb25b2e8e --- /dev/null +++ b/libre/your-freedom_emu/post-receive-hook.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +# Get this first thing +newpkgver_date=$(LC_ALL=C date -u +%Y%m%d) + +. "$(librelib messages)" +setup_traps +lock 9 "${0}.lock" "Waiting for previous run of %q to finish" "$0" + +. "$(librelib conf)" +load_files libretools +check_vars libretools WORKDIR ABSLIBRERECV ABSLIBRESEND + +# Start in the blacklist.git directory +newgitver=$(git log -n1 --format='%H' master -- your-freedom_emu-blacklist.txt) + +# Get the ABSLibre tree +gitget -f -p "$ABSLIBRESEND" checkout "$ABSLIBRERECV" "$WORKDIR/abslibre" +cd "$WORKDIR/abslibre/libre/your-freedom_emu" + +# Figure out info about the last version of your-freedom +oldgitver=$(sed -n 's/^_gitver=//p' PKGBUILD) +oldpkgver=$(sed -n 's/^pkgver=//p' PKGBUILD) +oldpkgver_date=${oldpkgver%%.*} +oldpkgver_rel=${oldpkgver#${oldpkgver_date}}; oldpkgver_rel=${oldpkgver_rel#.} oldpkgver_rel=${oldpkgver_rel:-0} + +# Make sure we actually have changes +if [[ "$newgitver" == "$oldgitver" ]]; then + msg 'your-freedom_emu-blacklist.txt has not changed, nothing to do' + exit 0 +fi + +# Handle doing multiple versions in the same day +if [[ "$newpkgver_date" == "$oldpkgver_date" ]]; then + declare -i newpkgver_rel=${oldpkgver_rel}+1 + newpkgver=${newpkgver_date}.${newpkgver_rel} +else + newpkgver=${newpkgver_date} +fi + +# Update the PKGBUILD +sed -i -e 's|^pkgver=.*|pkgver=${newpkgver}|' \ + -e 's|^_gitver=.*|_gitver=${newgitver}|' \ + -e 's|^pkgrel=.*|pkgrel=1|' \ + PKGBUILD +updpkgsums +git add PKGBUILD +git commit -m 'Update libre/your-freedom_emu' + +# Build the new package +makepkg +librestage libre + +# Publish the updates +git push +librerelease |