diff options
Diffstat (limited to 'pcr')
-rw-r--r-- | pcr/mediagoblin/PKGBUILD | 104 | ||||
-rwxr-xr-x | pcr/mediagoblin/mediagoblin.install | 4 |
2 files changed, 62 insertions, 46 deletions
diff --git a/pcr/mediagoblin/PKGBUILD b/pcr/mediagoblin/PKGBUILD index bda9ee821..12dbac169 100644 --- a/pcr/mediagoblin/PKGBUILD +++ b/pcr/mediagoblin/PKGBUILD @@ -1,56 +1,73 @@ # Maintainer (AUR): Immae <ismael.bouya@normalesup.org> # Maintainer: Isaac David <isacdaavid@at@isacdaavid@dot@info> +_GIT_BUILD=true + pkgname=mediagoblin -pkgver=0.9.0 -pkgrel=4 -pkgdesc='A free software media publishing platform' -arch=('i686' 'x86_64') -url='http://mediagoblin.org' +# HACK: bump parabola$n to avoid downgrades during _GIT to non-_GIT transitions +_pkgver=0.9.0+parabola1 +pkgver=0.9.0+parabola1+r12+g4752aa9f # automatic, use _pkgver or pkgver() +pkgrel=1 +pkgdesc='A free software media publishing platform (Git version)' +url='https://mediagoblin.org' license=('AGPL') -provides=('mediagoblin') -conflicts=('mediagoblin-git') -depends=('python' 'python-lxml' 'sqlite' 'python-pillow' 'python-virtualenv' 'npm' 'nodejs') -optdepends=( - 'postgresql: to use the postgresql database backend' - 'python-psycopg2: to use the postgresql database backend' - 'python-gobject: to handle videos' - 'gst-libav: to handle videos' - 'gst-python: to handle videos' - 'gst-plugins-good: to handle videos' - 'gst-plugins-bad: to handle videos' - 'gst-plugins-ugly: to handle videos' - ) -backup=('etc/webapps/mediagoblin/paste_local.ini' 'etc/webapps/mediagoblin/mediagoblin_local.ini') +# TODO: currently uses a virtualenv with some in-package dependencies +# (including architecture-dependent ones) and requires network +# access during build() to download them. the Debian package in +# experimental apparently doesn't. +arch=('i686' 'x86_64') +depends=('python' 'python-lxml' 'sqlite' 'python-pillow' + 'python-virtualenv' 'npm' 'nodejs') +optdepends=('postgresql: to use the postgresql database backend' + 'python-psycopg2: to use the postgresql database backend' + 'python-gobject: to handle videos' + 'gst-libav: to handle videos' + 'gst-python: to handle videos' + 'gst-plugins-good: to handle videos' + 'gst-plugins-bad: to handle videos' + 'gst-plugins-ugly: to handle videos') +backup=('etc/webapps/mediagoblin/paste_local.ini' + 'etc/webapps/mediagoblin/mediagoblin_local.ini') install=mediagoblin.install makedepends=('git' 'automake') -mksource=("mediagoblin-$pkgver::git://git.savannah.gnu.org/mediagoblin.git#tag=v$pkgver") -mksha256sums=('SKIP') -source=( - "https://repo.parabola.nu/other/$pkgname/$pkgname-$pkgver-src.tar.xz"{,.sig} - 'mediagoblin-paster.service' - 'mediagoblin-celeryd.service' - 'paste_local.ini' - 'mediagoblin_local.ini' - 'mediagoblin-tmpfiles.conf' -) -sha256sums=('a37657c686933a21dbf47e095a24c086ea509590f1e6bf95a63fe8779c198d31' - 'SKIP' - '2a02c90dcc8f69ac2a072044d3e4281347ed048c2610cb2e11295e4876cfb409' - 'f636d02f86d2dab5ecc901be5b0f7c42366500393f22dfdc7e354ca299fca65a' - 'ac914d60886d9bf53d3f40b8b00a60d46ada1cac9130210e045a4776d898e884' - '9adf338f5dbfb94ee7ae29433091b6991a1fa39a6135a8295f9f1cc1fde0edc1' - 'abb6c4c4e54d4372adfe67ab22371ad625505098311955e5ae8e34102b059d47') -validpgpkeys=('38D33EF29A7691134357648733466E12EC7BA943') # Isaac David <isacdaavid@isacdaavid@dot@info> +if [ $_GIT_BUILD = true ]; then + source=("$pkgname-${_pkgver%%+parabola*}::git://git.savannah.gnu.org/$pkgname.git#branch=stable") + sha256sums=('SKIP') +else + source=("https://git.savannah.gnu.org/cgit/$pkgname.git/snapshot/${pkgname}-${_pkgver%%+parabola*}.tar.gz") + sha256sums=('a23490ed4d9dfa107ca4cd8483a063f0338e02a4783a176915d5521b7a55fb21') +fi +source+=('mediagoblin-paster.service' + 'mediagoblin-celeryd.service' + 'paste_local.ini' + 'mediagoblin_local.ini' + 'mediagoblin-tmpfiles.conf') +sha256sums+=('2a02c90dcc8f69ac2a072044d3e4281347ed048c2610cb2e11295e4876cfb409' + 'f636d02f86d2dab5ecc901be5b0f7c42366500393f22dfdc7e354ca299fca65a' + 'ac914d60886d9bf53d3f40b8b00a60d46ada1cac9130210e045a4776d898e884' + '9adf338f5dbfb94ee7ae29433091b6991a1fa39a6135a8295f9f1cc1fde0edc1' + 'abb6c4c4e54d4372adfe67ab22371ad625505098311955e5ae8e34102b059d47') + +pkgver() { + printf -- "%s" "$_pkgver" + [ $_GIT_BUILD != true ] && return + cd "$srcdir/$pkgname-${_pkgver%%+parabola*}" + git describe --long | + sed "s/^v${_pkgver%%+parabola*}// ; s/\([^-]*-g\)/r\1/ ; s/-/+/g" +} prepare() { - cd "$srcdir/mediagoblin-$pkgver" - git submodule init - git submodule update + cd "$srcdir/$pkgname-${_pkgver%%+parabola*}" + if [ $_GIT_BUILD = true ]; then + git submodule init + git submodule update + else + sed -i /^git/d bootstrap.sh + fi } build() { - cd "$srcdir/mediagoblin-$pkgver" + cd "$srcdir/$pkgname-${_pkgver%%+parabola*}" ./bootstrap.sh ./configure --with-python3 @@ -59,7 +76,7 @@ build() { } package() { - cd "$srcdir/mediagoblin-$pkgver" + cd "$srcdir/$pkgname-${_pkgver%%+parabola*}" rm -rf .git .gitignore install -dm755 "$pkgdir"/usr/share/webapps/mediagoblin/ @@ -67,7 +84,8 @@ package() { cd "$pkgdir"/usr/share/webapps/mediagoblin find . -name '*.pyc' -delete - find . -type f -exec sed -i "s|$srcdir/mediagoblin|/usr/share/webapps/mediagoblin|g" {} \; + find . -type f -exec sed -Ei \ + "s|$srcdir/$pkgname(-${_pkgver%%+parabola*})?|/usr/share/webapps/$pkgname|g" {} \; install -dm755 "$pkgdir"/var/lib/mediagoblin install -dm755 "$pkgdir"/etc/webapps/mediagoblin diff --git a/pcr/mediagoblin/mediagoblin.install b/pcr/mediagoblin/mediagoblin.install index 4149ed0cf..fd485db16 100755 --- a/pcr/mediagoblin/mediagoblin.install +++ b/pcr/mediagoblin/mediagoblin.install @@ -23,7 +23,5 @@ post_upgrade() { pre_remove() { /usr/bin/systemd-tmpfiles --remove mediagoblin.conf - - userdel mediagoblin &> /dev/null - groupdel mediagoblin &> /dev/null + userdel mediagoblin } |