summaryrefslogtreecommitdiff
path: root/nonprism/your-privacy
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-08-27 01:12:09 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-08-27 01:12:09 -0300
commitf5ddebc108759dc31dc2a381b26d8de75c5bb7a7 (patch)
treeed5311ac794af1c52f15b93cfbcdb30931521be3 /nonprism/your-privacy
parent2ceaa74fcef92ae6a1c2d985cc7f5bc13b2fd552 (diff)
downloadabslibre-f5ddebc108759dc31dc2a381b26d8de75c5bb7a7.tar.gz
abslibre-f5ddebc108759dc31dc2a381b26d8de75c5bb7a7.tar.bz2
abslibre-f5ddebc108759dc31dc2a381b26d8de75c5bb7a7.zip
your-privacy-20140827-1: updating version, add changes based on your-freedom
Diffstat (limited to 'nonprism/your-privacy')
-rw-r--r--nonprism/your-privacy/PKGBUILD42
-rw-r--r--nonprism/your-privacy/post-receive-hook.sh56
2 files changed, 81 insertions, 17 deletions
diff --git a/nonprism/your-privacy/PKGBUILD b/nonprism/your-privacy/PKGBUILD
index 393a9f3ef..15b6e7995 100644
--- a/nonprism/your-privacy/PKGBUILD
+++ b/nonprism/your-privacy/PKGBUILD
@@ -1,25 +1,33 @@
-# Maintainer: Parabola Project <dev@list.parabolagnulinux.org>
+# Maintainer: Parabola Project <dev@lists.parabolagnulinux.org>
+
pkgname=your-privacy
-pkgver=$(LC_ALL=C date -u +%Y%m%d)
-pkgrel=1
pkgdesc="This package will remove support for unsafe/dangerous for privacy protocols/services."
-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
+_gitver=ee8234dcb7e270c434d6cce01942600feb9444f0
+pkgrel=1
+
+arch=('any')
install=${pkgname}.install
replaces=(your-coherence)
-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=('f3ed6499df6780764beb53a7109fe8d6')
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=('5fd14982619414fea1882b351607291e')
+ conflicts=($(
+ < blacklist-${_gitver}.txt \
+ blacklist 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/nonprism/your-privacy/post-receive-hook.sh b/nonprism/your-privacy/post-receive-hook.sh
new file mode 100644
index 000000000..4742d2c85
--- /dev/null
+++ b/nonprism/your-privacy/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-privacy-blacklist.txt)
+
+# Get the ABSLibre tree
+gitget -f -p "$ABSLIBRESEND" checkout "$ABSLIBRERECV" "$WORKDIR/abslibre"
+cd "$WORKDIR/abslibre/nonprism/your-privacy"
+
+# 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-privacy-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 nonprism/your-privacy'
+
+# Build the new package
+makepkg
+librestage libre
+
+# Publish the updates
+git push
+librerelease