From The Compiler, 6 Years ago, written in Bash.
Embed
  1. # $Id: PKGBUILD 70295 2012-05-03 22:05:00Z spupykin $
  2. # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
  3. # Maintainer: tobias <tobias@archlinux.org>
  4. # Committer: Manolis Tzanidakis <manolis@archlinux.org>
  5. # Contributor: Simon Lackerbauer <calypso "at" strpg.org>
  6.  
  7. pkgname=phpmyadmin
  8. pkgver=3.5.1
  9. pkgrel=1
  10. pkgdesc="A PHP and hence web-based tool to administrate MySQL over the WWW"
  11. arch=('any')
  12. url="http://www.phpmyadmin.net"
  13. license=('GPL')
  14. depends=('mysql-clients' 'php')
  15. optdepends=('php-mcrypt: to use phpMyAdmin internal authentication'
  16.             'python')
  17. backup=("etc/webapps/phpmyadmin/.htaccess"
  18.         "etc/webapps/phpmyadmin/config.inc.php")
  19. source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/phpMyAdmin-$pkgver-all-languages.tar.bz2)
  20. install=$pkgname.install
  21. md5sums=('06bb0b8a945e114e767dfaec67dc5ae0')
  22.  
  23. build() {
  24.   _instdir=$pkgdir/usr/share/webapps/phpMyAdmin
  25.   mkdir -p ${_instdir} $pkgdir/etc/webapps/phpmyadmin
  26.   cd ${_instdir}
  27.  
  28.   cp -ra $srcdir/phpMyAdmin-${pkgver}-all-languages/* .
  29.   echo "deny from all" >$pkgdir/etc/webapps/phpmyadmin/.htaccess
  30.  
  31.   ln -s /etc/webapps/phpmyadmin/.htaccess ${_instdir}/.htaccess
  32.   ln -s /etc/webapps/phpmyadmin/config.inc.php ${_instdir}/config.inc.php
  33.   cp ${_instdir}/config.sample.inc.php $pkgdir/etc/webapps/phpmyadmin/config.inc.php
  34.  
  35.   cat >$pkgdir/etc/webapps/phpmyadmin/apache.example.conf <<EOF
  36.         Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"
  37.         <Directory "/usr/share/webapps/phpMyAdmin">
  38.                 AllowOverride All
  39.                 Options FollowSymlinks
  40.                 Order allow,deny
  41.                 Allow from all
  42.                 php_admin_value open_basedir "/srv/:/tmp/:/usr/share/webapps/:/etc/webapps:/usr/share/pear/"
  43.         </Directory>
  44. EOF
  45. }