Magellan Linux

Contents of /smage/trunk/extras/phpmyadmin/phpmyadmin-4.4.13.1-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7089 - (show annotations) (download)
Tue Sep 8 10:32:24 2015 UTC (9 years, 2 months ago) by niro
File size: 2898 byte(s)
-updated configuration
1 # $Id$
2
3 PNAME="phpmyadmin"
4 PVER="4.4.13.1"
5 PBUILD="r2"
6
7 PCAT="dev-db"
8
9 DESCRIPTION="phpMyAdmin - a web-based administration frontend for MySQL databases written in PHP."
10 HOMEPAGE="http://www.phpmyadmin.net/"
11
12 DEPEND=">= net-www/apache2-2.4
13 >= dev-php/php-apache-5.4
14 >= dev-php/php-curl-5.4
15 >= dev-php/php-gd-5.4
16 >= dev-php/php-intl-5.4
17 >= dev-php/php-mbstring-5.4
18 >= dev-php/php-mysql-5.4
19 >= dev-php/php-xml-5.4
20 >= virtual/sed"
21
22 SRCFILE="phpMyAdmin-${PVER}-all-languages.tar.xz"
23 SRCDIR="${BUILDDIR}/phpMyAdmin-${PVER}-all-languages"
24
25 CONF_REV=1.6
26 APACHE_CONF_REV=1.2
27
28 sminclude mtools
29
30 SRC_URI=(
31 http://files.phpmyadmin.net/phpMyAdmin/${PVER}/${SRCFILE}
32 mirror://${PNAME}/${SRCFILE}
33 mirror://${PNAME}/config.inc-${CONF_REV}
34 mirror://${PNAME}/phpmyadmin.conf-${APACHE_CONF_REV}
35 mirror://${PNAME}/${PNAME}-${PVER}-fix-doc-pathes.patch
36 )
37
38 UP2DATE="updatecmd ${HOMEPAGE}/downloads/ | sed -e 's:-languages::g' -e 's:-english::g' | highesttarball xz"
39
40 src_prepare()
41 {
42 munpack ${SRCFILE} || die
43 cd ${SRCDIR}
44
45 # fix doc pathes to /usr/share/doc/phpmyadmin-@@PVER@@
46 # and fix reading of gzip compressed files
47 mpatch ${PNAME}-${PVER}-fix-doc-pathes.patch || die
48 # now fix the @@PVER@@ pathes to ${PVER}
49 sed -i "s:@@PVER@@:${PVER}:g" changelog.php license.php || die
50 }
51
52 src_install()
53 {
54 cd ${SRCDIR}
55
56 # install
57 minstalldir /usr/share/phpmyadmin || die
58 cp -ad ${SRCDIR}/* ${BINDIR}/usr/share/phpmyadmin || die
59
60 # phpmyadmin default configuration
61 minstalldir /etc/phpmyadmin || die
62 minstallfile -s config.inc-${CONF_REV} /etc/phpmyadmin/config.inc.php || die
63 mlink /etc/phpmyadmin/config.inc.php /usr/share/phpmyadmin/ || die
64
65 # apache module configuration file
66 minstalldir /etc/apache2/modules.d || die
67 minstallfile -s phpmyadmin.conf-${APACHE_CONF_REV} /etc/apache2/modules.d/phpmyadmin.conf || die
68
69 # clean up and remove unneeded stuff
70 rm -f ${BINDIR}/usr/share/phpmyadmin/*txt || die
71 rm -f ${BINDIR}/usr/share/phpmyadmin/[CIRLT]* || die
72 rm -f ${BINDIR}/usr/share/phpmyadmin/config.sample.inc.php || die
73 rm -f ${BINDIR}/usr/share/phpmyadmin/libraries/.htaccess || die
74
75 # runtime directories
76 mkeepdir /var/lib/phpmyadmin/save || die
77 mchown apache:apache /var/lib/phpmyadmin/save || die
78 mchmod 0750 /var/lib/phpmyadmin/save || die
79
80 mkeepdir /var/lib/phpmyadmin/upload || die
81 mchown apache:apache /var/lib/phpmyadmin/upload || die
82 mchmod 0750 /var/lib/phpmyadmin/upload || die
83
84 mkeepdir /var/lib/phpmyadmin/config || die
85 mchown apache:apache /var/lib/phpmyadmin/config || die
86 mchmod 0750 /var/lib/phpmyadmin/config || die
87 mlink /var/lib/phpmyadmin/config /usr/share/phpmyadmin/config || die
88
89 # install docs
90 minstalldocs ChangeLog CREDITS Documentation.txt LICENSE RE* TODO || die
91 }
92
93 postinstall()
94 {
95 # generate a secret key for this installation
96 sed -i "/'blowfish_secret'/s/MUSTBECHANGEDONINSTALL/$RANDOM$RANDOM$RANDOM$RANDOM/" /etc/phpmyadmin/config.inc.php
97 }