blob: 8a5e20e697142e77ba76f2cd636a09aac6e9dd47 (
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
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
_php=php5
pkgname=drupal7
pkgver=7.44
pkgrel=0
pkgdesc="An open source content management platform"
url="https://www.drupal.org/"
arch="noarch"
license="GPL"
depends="${_php}-fpm ${_php}-xml ${_php}-json ${_php}-gd ${_php}-ftp ${_php}-posix ${_php}-curl ${_php}-zlib
${_php}-dom ${_php}-ctype ${_php}-sockets"
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc"
pkggroups="www-data"
source="http://ftp.drupal.org/files/projects/drupal-$pkgver.tar.gz"
_builddir="$srcdir/drupal-$pkgver"
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"
}
package() {
cd "$_builddir"
mkdir -p "$pkgdir"/var/lib/$pkgname \
"$pkgdir"/usr/share/webapps/$pkgname/ \
"$pkgdir"/etc/$pkgname/default \
"$pkgdir"/usr/share/doc/"$pkgname" || return 1
# move drupals sites directory where all module/themes/libaries reside
mv sites "$pkgdir"/var/lib/$pkgname/ || return 1
mkdir -p "$pkgdir"/var/lib/$pkgname/sites/default/files || return 1
# move drupals default config to sysconfig dir.
# multisite setups are advanced and needs user configuration
mv $pkgdir/var/lib/$pkgname/sites/default/default.settings.php \
"$pkgdir"/etc/$pkgname/default/ || return 1
ln -s /etc/"$pkgname"/default/settings.php \
$pkgdir/var/lib/$pkgname/sites/default/settings.php || return 1
mv $pkgdir/var/lib/$pkgname/sites/example.sites.php \
"$pkgdir"/etc/$pkgname/ || return 1
ln -sf /etc/"$pkgname"/sites.php \
$pkgdir/var/lib/$pkgname/sites/sites.php || return 1
# move uneeded txt files to doc package
for file in *.txt; do
[ "$file" != "robots.txt" ] && mv $file \
"$pkgdir"/usr/share/doc/"$pkgname"/
done
# make drupal a webapp
mv * "$pkgdir"/usr/share/webapps/$pkgname/ || return 1
ln -sf /var/lib/$pkgname/sites \
"$pkgdir"/usr/share/webapps/$pkgname/sites || return 1
# make sure the webserver can access/write to needed files/directories
chgrp -R www-data "$pkgdir"/var/lib/$pkgname \
"$pkgdir"/etc/$pkgname || return 1
chmod g+w "$pkgdir"/var/lib/$pkgname/sites/all/* \
"$pkgdir"/var/lib/$pkgname/sites/default/files || return 1
}
md5sums="965ab5fe5457625ec8c18e5c1c455008 drupal-7.44.tar.gz"
sha256sums="a62971d20edd4ffd4c6dd03eb5fe3d213777d3807f48b7399bb73688dfd4bc5a drupal-7.44.tar.gz"
sha512sums="67d358c85259b7722824f214be177c40819c7e0c06c8ec7511b7f87ecff1ab6622af62fc5769b62682e0e67f718743afa6b0a9e4c55e2348a1b408eeb566c3e9 drupal-7.44.tar.gz"
|