summaryrefslogtreecommitdiff
path: root/pcr/mediagoblin/PKGBUILD
blob: 267b5c1e3d1ee135bfcc8b4bff9af75d9e2ef00a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Maintainer (AUR): Immae <ismael.bouya@normalesup.org>
# Maintainer: Isaac David <isacdaavid@at@isacdaavid@dot@info>


pkgname=mediagoblin
pkgver=0.11.0
pkgrel=1
pkgdesc='A free software media publishing platform (Git version)'
url='https://mediagoblin.org'
license=('AGPL')
# 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=('autoconf2.13' 'automake')
source=(${pkgname}-${pkgver}::https://git.savannah.gnu.org/cgit/${pkgname}.git/snapshot/${pkgname}-${pkgver}.tar.gz
        'mediagoblin-paster.service'
        'mediagoblin-celeryd.service'
        'paste_local.ini'
        'mediagoblin_local.ini'
        'mediagoblin-tmpfiles.conf'
        'ac.patch')
sha256sums=('b6ffaf09e7e0cab675127a445b8f5bf60977e0abcf5dc9cce0bb2ed44db3fbc7'
            '2a02c90dcc8f69ac2a072044d3e4281347ed048c2610cb2e11295e4876cfb409'
            'f636d02f86d2dab5ecc901be5b0f7c42366500393f22dfdc7e354ca299fca65a'
            'ac914d60886d9bf53d3f40b8b00a60d46ada1cac9130210e045a4776d898e884'
            '9adf338f5dbfb94ee7ae29433091b6991a1fa39a6135a8295f9f1cc1fde0edc1'
            'abb6c4c4e54d4372adfe67ab22371ad625505098311955e5ae8e34102b059d47'
            '1c8dd28eeffee322c354b211170d690dbdd32b5007274b76e5c4da62efac272f')


prepare()
{
  cd "${srcdir}"/${pkgname}-${pkgver}
#   sed -i 's/aclocal /aclocal-1.16 /' bootstrap.sh
#   sed -i 's/autoreconf -fvi/autoreconf-2.13 -i --force/' bootstrap.sh
  sed -i '/^git/d' bootstrap.sh

  sed -i '/dnl AC_CONFIG_MACRO_DIR([m4])/d' configure.ac

  echo "applying ac.patch"
  autoconf
  patch -Np1 < "${srcdir}"/ac.patch
}

build()
{
  cd "${srcdir}"/${pkgname}-${pkgver}
# autoupdate
#   ./bootstrap.sh
# autoreconf -fvi

#   ./configure
  ./configure --without-virtualenv
  make
  ./bin/easy_install flup
}

package()
{
  cd "${srcdir}"/${pkgname}-${pkgver}
  rm -rf .git .gitignore

  install -dm755 "${pkgdir}"/usr/share/webapps/mediagoblin/
  cp -a . "${pkgdir}"/usr/share/webapps/mediagoblin

  cd "${pkgdir}"/usr/share/webapps/mediagoblin
  find . -name '*.pyc' -delete
  find . -type f -exec sed -Ei \
       "s|${srcdir}/${pkgname}(-${pkgver})?|/usr/share/webapps/${pkgname}|g" {} \;

  install -dm755 "${pkgdir}"/var/lib/mediagoblin
  install -dm755 "${pkgdir}"/etc/webapps/mediagoblin

  install -Dm644 "$srcdir"/paste_local.ini "${pkgdir}"/etc/webapps/mediagoblin/paste_local.ini
  ln -s /etc/webapps/mediagoblin/paste_local.ini "${pkgdir}"/usr/share/webapps/mediagoblin/paste_local.ini
  install -Dm644 "$srcdir"/mediagoblin_local.ini "${pkgdir}"/etc/webapps/mediagoblin/mediagoblin_local.ini
  ln -s /etc/webapps/mediagoblin/mediagoblin_local.ini "${pkgdir}"/usr/share/webapps/mediagoblin/mediagoblin_local.ini

  ln -s /var/lib/mediagoblin/ "${pkgdir}"/usr/share/webapps/mediagoblin/user_dev

  install -Dm644 "$srcdir"/mediagoblin-paster.service "${pkgdir}"/usr/lib/systemd/system/mediagoblin-paster.service
  install -Dm644 "$srcdir"/mediagoblin-celeryd.service "${pkgdir}"/usr/lib/systemd/system/mediagoblin-celeryd.service
  install -Dm644 "$srcdir"/mediagoblin-tmpfiles.conf "${pkgdir}"/usr/lib/tmpfiles.d/mediagoblin.conf
}