diff options
author | Roberto Oliveira <robertoguimaraes8@gmail.com> | 2017-07-08 23:29:47 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-07-10 09:02:00 +0000 |
commit | e9e50ef290b538f12c9147f65d147dba3bbd6b9c (patch) | |
tree | 995ff94980078b21059c6ee17e69ff661acd468b | |
parent | 79cf0e83629d59f8c4548615c21e8f7dda1ea35b (diff) | |
download | aports-e9e50ef290b538f12c9147f65d147dba3bbd6b9c.tar.bz2 aports-e9e50ef290b538f12c9147f65d147dba3bbd6b9c.tar.xz |
community/drupal7: modernize APKBUILD
-rw-r--r-- | community/drupal7/APKBUILD | 42 |
1 files changed, 13 insertions, 29 deletions
diff --git a/community/drupal7/APKBUILD b/community/drupal7/APKBUILD index 0336d6a115..23ea6d4e74 100644 --- a/community/drupal7/APKBUILD +++ b/community/drupal7/APKBUILD @@ -10,62 +10,46 @@ 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" -} +builddir="$srcdir/drupal-$pkgver" package() { - cd "$_builddir" + cd "$builddir" mkdir -p "$pkgdir"/var/lib/$pkgname \ "$pkgdir"/usr/share/webapps/$pkgname/ \ "$pkgdir"/etc/$pkgname/default \ - "$pkgdir"/usr/share/doc/"$pkgname" || return 1 + "$pkgdir"/usr/share/doc/"$pkgname" # 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 + mv sites "$pkgdir"/var/lib/$pkgname/ + mkdir -p "$pkgdir"/var/lib/$pkgname/sites/default/files # 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 + "$pkgdir"/etc/$pkgname/default/ ln -s /etc/"$pkgname"/default/settings.php \ - $pkgdir/var/lib/$pkgname/sites/default/settings.php || return 1 + $pkgdir/var/lib/$pkgname/sites/default/settings.php mv $pkgdir/var/lib/$pkgname/sites/example.sites.php \ - "$pkgdir"/etc/$pkgname/ || return 1 + "$pkgdir"/etc/$pkgname/ ln -sf /etc/"$pkgname"/sites.php \ - $pkgdir/var/lib/$pkgname/sites/sites.php || return 1 + $pkgdir/var/lib/$pkgname/sites/sites.php # 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 + mv * "$pkgdir"/usr/share/webapps/$pkgname/ ln -sf /var/lib/$pkgname/sites \ - "$pkgdir"/usr/share/webapps/$pkgname/sites || return 1 + "$pkgdir"/usr/share/webapps/$pkgname/sites # make sure the webserver can access/write to needed files/directories chgrp -R www-data "$pkgdir"/var/lib/$pkgname \ - "$pkgdir"/etc/$pkgname || return 1 + "$pkgdir"/etc/$pkgname chmod g+w "$pkgdir"/var/lib/$pkgname/sites/all/* \ - "$pkgdir"/var/lib/$pkgname/sites/default/files || return 1 + "$pkgdir"/var/lib/$pkgname/sites/default/files } sha512sums="ab7ad8d9cb26e89b9d81280b1677584072db627d508ccade9442c95a90f24c94d11561013c8a7297ddae6ae43696d0b711b8c37ab98f89539f6f0e0154db6344 drupal-7.56.tar.gz" |