1 # Contributor: fauno <fauno@kiwwwi.com.ar>
6 # find available plugins and locales
7 srcfile=${SRCDEST}/${pkgbase}-${pkgver}.tar.gz
8 if [ -e ${srcfile} ]; then
9 plugins=($(bsdtar -tf ${srcfile} \
10 ${pkgbase}-${pkgver}/plugins | \
11 cut -d'/' -f3 | sort -u))
12 locales=($(bsdtar -tf ${srcfile} \
13 ${pkgbase}-${pkgver}/locale | \
14 cut -d'/' -f3 | sort -u))
17 # looping avoids having "statusnet-plugin-" package
18 true && pkgname=(${pkgname}-base
19 $(for plugin in ${plugins[@]}; do
20 echo ${plugin} | tr [A-Z] [a-z] | \
21 sed "s/^/statusnet-plugin-/"
23 $(for locale in ${locales[@]}; do
24 echo ${locale} | tr [A-Z] [a-z] | \
25 sed "s/^/statusnet-i18n-/"
29 pkgdesc="StatusNet is a Free and Open Source microblogging platform."
30 url="http://status.net"
32 depends=('php>=5.2.3' 'mysql>=5' 'php-gd' 'php-curl' 'php-gmp')
33 source=("http://status.net/${pkgbase}-${pkgver}.tar.gz"
35 install=statusnet.install
36 md5sums=('766c9d42825fc99d8ad6c554a959568b'
37 'c638cb36b7da7eb67a67e031f59e6068')
38 options=(!strip !zipman emptydirs)
44 package_statusnet-base() {
45 provides=('statusnet')
46 optdepends=('memcache: for caching database queries'
47 'php-xcache: for accelerating PHP code execution'
48 'php-apc: for accelerating PHP code execution'
49 'php-ldap: for the LDAP plugin'
50 'statusnet-plugin-ostatus: for federation')
52 cd "$srcdir/$pkgbase-${pkgver}"
54 etc_dir="${pkgdir}/etc/webapps/${pkgbase}"
55 usr_dir="${pkgdir}/usr/share/webapps/${pkgbase}"
59 install -d ${pkgdir}/usr/share/doc/${pkgbase}/
60 install -d ${pkgdir}/usr/share/licenses/${pkgbase}
62 install -m644 ./{config.php,htaccess}.sample \
63 ${pkgdir}/usr/share/doc/${pkgbase}/
65 install -m644 ./{README,EVENTS.txt,lighttpd.conf.example} \
66 ${pkgdir}/usr/share/doc/${pkgbase}/
68 install -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgbase}/
70 rm -f *.sample README COPYING README EVENTS.txt *.example
73 chmod a+w ${usr_dir}/{avatar,background,file}
75 msg2 "Install bogus config.php"
76 touch ${etc_dir}/config.php
77 chmod a+w ${etc_dir}/config.php
78 ln -s /etc/webapps/statusnet/config.php ${usr_dir}/config.php
80 msg2 "Remove locale and plugins in favor of split packages"
81 rm -rf ${usr_dir}/{locale,plugins}
83 install -d ${usr_dir}/plugins
84 install -d ${usr_dir}/locale
86 install -d ${pkgdir}/srv/http
87 ln -s /usr/share/webapps/${pkgbase} ${pkgdir}/srv/http/
90 # Helper for creating i18n packages
91 statusnet-i18n-helper() {
92 cd "${srcdir}/${pkgbase}-${pkgver}"
94 install -d "${pkgdir}/usr/share/webapps/statusnet/locale/${1}"
95 cp -ra "./locale/${1}" "${pkgdir}/usr/share/webapps/statusnet/locale/${1}/"
98 # Helper for creating plugin packages
99 statusnet-plugin-helper() {
100 cd "${srcdir}/${pkgbase}-${pkgver}"
102 install -d "${pkgdir}/usr/share/webapps/statusnet/plugins/${1}"
103 cp -ra "./plugins/${1}" "${pkgdir}/usr/share/webapps/statusnet/plugins/${1}/"
107 for plugin in ${plugins[@]}; do
108 plugin_lower=$(echo ${plugin} | tr [A-Z] [a-z])
111 package_statusnet-plugin-${plugin_lower}() {
112 pkgdesc='${plugin} plugin for StatusNet'
113 depends=('statusnet-base')
114 groups=('statusnet-plugins')
116 statusnet-plugin-helper ${plugin}
120 for locale in ${locales[@]}; do
121 locale_lower=$(echo ${locale} | tr [A-Z] [a-z])
124 package_statusnet-i18n-${locale_lower}() {
125 pkgdesc='${locale} locale for StatusNet'
126 depends=('statusnet-base')
127 groups=('statusnet-locales')
129 statusnet-i18n-helper ${locale}
132 pkgdesc="StatusNet is a Free and Open Source microblogging platform."