summaryrefslogtreecommitdiff
path: root/pkgs/gnu-social/PKGBUILD
blob: 8de0ac2c3c32c9d2917fba8b01def844053bb598 (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
# Maintainer: fauno <fauno@kiwwwi.com.ar>
pkgname='gnu-social-git'
pkgver=20110113
pkgrel=1
pkgdesc="GNU social is a project to create a decentralized social network"
arch=('any')
url="http://social.foocorp.net/software/social/"
license=('AGPL')
groups=('social-web')
depends=('php>=5.2.3' 'mysql>=5' 'php-gd' 'php-curl' 'php-gmp')
makedepends=('git')
provides=('gnu-social')
conflicts=('gnu-social')
replaces=('gnu-social')
backup=(etc/webapps/gnu-social/config.php)
options=()
install=gnu-social.install
source=(gnu-social.install)
noextract=()

_gitroot="git://gitorious.org/+socialites/statusnet/gnu-social.git"
_gitname="gnu-social"

build() {
  cd "$srcdir"
  msg "Connecting to GIT server...."

  if [ -d $_gitname ] ; then
    cd $_gitname && git pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot $_gitname
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  rm -rf "$srcdir/$_gitname-build"
  git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
}

package() {
  _pkgname=$_gitname
  cd "$srcdir/$_gitname-build"

  etc_dir="${pkgdir}/etc/webapps/${_pkgname}"
  usr_dir="${pkgdir}/usr/share/webapps/${_pkgname}"

  install -d ${usr_dir}
  install -d ${etc_dir}
  install -d ${pkgdir}/usr/share/doc/${_pkgname}/
  install -d ${pkgdir}/usr/share/licenses/${_pkgname}

  install -m644 ./{config.php,htaccess}.sample \
      ${pkgdir}/usr/share/doc/${_pkgname}/

  install -m644 ./{README,EVENTS.txt,lighttpd.conf.example} \
      ${pkgdir}/usr/share/doc/${_pkgname}/

  install -m644 COPYING ${pkgdir}/usr/share/licenses/${_pkgname}/

  rm -f *.sample README COPYING README EVENTS.txt *.example

  cp -ra * ${usr_dir}/
  chmod a+w ${usr_dir}/{avatar,background,file}

  msg2 "Install bogus config.php"
  touch ${etc_dir}/config.php

  msg2 "Making dir and config file writable"
  chmod a+w ${etc_dir}/config.php ${usr_dir}/
  ln -s /etc/webapps/$_pkgname/config.php ${usr_dir}/config.php

}
md5sums=('cd8991b848d4e8230c38bdc51894e76d')