2.11.6
[phpmyadmin/arisferyanto.git] / contrib / packaging / Fedora / phpMyAdmin.spec
blob3441a93313b063c96d73a65550900b0291de1ffc
1 %define _myadminpath /var/www/myadmin
2 %define pkgrelease rc1
3 %define microrelease 1
5 Name: phpMyAdmin
6 Version: 2.8.0
7 Release: %{pkgrelease}.%{microrelease}
8 License: GPL
9 Group: Applications/Databases/Interfaces
10 Source0: http://prdownloads.sourceforge.net/phpmyadmin/%{name}-%{version}-%{pkgrelease}.tar.bz2
11 Source1: phpMyAdmin-http.conf
12 URL: http://sourceforge.net/projects/phpmyadmin/
13 Requires: mysql
14 Requires: php-mysql
15 Buildarch: noarch
16 BuildRoot: %{_tmppath}/%{name}-root
18 Summary: phpMyAdmin - web-based MySQL administration
20 %description
21 phpMyAdmin can manage a whole MySQL-server (needs a super-user) but
22 also a single database. To accomplish the latter you'll need a
23 properly set up MySQL-user which can read/write only the desired
24 database. It's up to you to look up the appropiate part in the MySQL
25 manual. Currently phpMyAdmin can:
26 - create and drop databases
27 - create, copy, drop and alter tables
28 - delete, edit and add fields
29 - execute any SQL-statement, even batch-queries
30 - manage keys on fields
31 - load text files into tables
32 - create (*) and read dumps of tables
33 - export (*) and import data to CSV values
34 - administer multiple servers and single databases
35 - check referencial integrity
36 - create complex queries automatically connecting required tables
37 - create PDF graphics of your database layout
38 - communicate in more than 38 different languages
41 %prep
42 %setup -q -n %{name}-%{version}-%{pkgrelease}
45 %build
48 %install
49 [ "${RPM_BUILD_ROOT}" != "/" ] && [ -d "${RPM_BUILD_ROOT}" ] && \
50 rm -rf "${RPM_BUILD_ROOT}"
52 # Create directories.
54 install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/{css,js,lang,libraries,themes}
55 install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/libraries/{auth,dbg,dbi,engines}
56 install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/libraries/{export,tcpdf,import}
57 install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/libraries/transformations
58 install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/libraries/tcpdf/font
59 install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/themes/{darkblue_orange,original}
60 install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/themes/darkblue_orange/{css,img}
61 install -d "${RPM_BUILD_ROOT}%{_myadminpath}"/themes/original/{css,img}
63 # Install files.
65 install libraries/config.default.php \
66 "${RPM_BUILD_ROOT}%{_myadminpath}"/config.inc.php
67 install *.{php,ico} "${RPM_BUILD_ROOT}%{_myadminpath}"/
68 install ChangeLog LICENSE README "${RPM_BUILD_ROOT}%{_myadminpath}"/
69 install Documentation.html docs.css "${RPM_BUILD_ROOT}%{_myadminpath}"/
70 install css/* "${RPM_BUILD_ROOT}%{_myadminpath}/css"/
71 install js/* "${RPM_BUILD_ROOT}%{_myadminpath}/js"/
72 install lang/*.php "${RPM_BUILD_ROOT}%{_myadminpath}/lang"/
73 install libraries/*.php "${RPM_BUILD_ROOT}%{_myadminpath}/libraries"/
74 install libraries/auth/*.php "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/auth"/
75 install libraries/dbg/*.php "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/dbg"/
76 install libraries/dbi/*.php "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/dbi"/
77 install libraries/engines/*.php \
78 "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/engines"/
79 install libraries/export/*.php \
80 "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/export"/
81 install libraries/tcpdf/*.php "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/tcpdf"/
82 install libraries/tcpdf/font/*.{php,z} \
83 "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/tcpdf/font"/
84 install libraries/import/*.php \
85 "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/import"/
86 install libraries/transformations/*.php \
87 "${RPM_BUILD_ROOT}%{_myadminpath}/libraries/transformations"/
88 install themes/darkblue_orange/*.{php,png} \
89 "${RPM_BUILD_ROOT}%{_myadminpath}/themes/darkblue_orange"/
90 install themes/darkblue_orange/css/*.php \
91 "${RPM_BUILD_ROOT}%{_myadminpath}/themes/darkblue_orange/css"/
92 install themes/darkblue_orange/img/*.{png,ico} \
93 "${RPM_BUILD_ROOT}%{_myadminpath}/themes/darkblue_orange/img"/
94 install themes/original/*.{php,png} \
95 "${RPM_BUILD_ROOT}%{_myadminpath}/themes/original"/
96 install themes/original/css/*.php \
97 "${RPM_BUILD_ROOT}%{_myadminpath}/themes/original/css"/
98 install themes/original/img/*.{png,ico} \
99 "${RPM_BUILD_ROOT}%{_myadminpath}/themes/original/img"/
101 # Create documentation directories.
103 DOCROOT="${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}"
104 install -d "${DOCROOT}"
105 install -d "${DOCROOT}"/{lang,scripts,transformations}
107 # Install documentation files.
109 install RELEASE-DATE-* "${DOCROOT}"/
110 install CREDITS ChangeLog INSTALL LICENSE "${DOCROOT}"/
111 install README TODO "${DOCROOT}"/
112 install Documentation.* docs.css "${DOCROOT}"/
113 install translators.html "${DOCROOT}"/
114 install lang/*.sh "${DOCROOT}"/lang/
115 install scripts/* "${DOCROOT}"/scripts/
116 install libraries/tcpdf/README "${DOCROOT}"/README.tcpdf
117 install libraries/import/README "${DOCROOT}"/README.import
118 install libraries/transformations/README "${DOCROOT}"/transformations/
119 install libraries/transformations/TEMPLATE* "${DOCROOT}"/transformations/
120 install libraries/transformations/*.sh "${DOCROOT}"/transformations/
122 # Install configuration file for Apache.
124 install -d "${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d"
125 install "%{SOURCE1}" \
126 "${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/phpMyAdmin.conf"
128 # Generate non-configuration file list.
130 (cd "${RPM_BUILD_ROOT}"; ls -d ."%{_myadminpath}"/*) |
131 sed -e '/\/config\.inc\.php$/d' -e 's/^.//' > files.list
135 %clean
136 [ "${RPM_BUILD_ROOT}" != "/" ] && [ -d "${RPM_BUILD_ROOT}" ] && \
137 rm -rf "${RPM_BUILD_ROOT}"
140 %files -f files.list
141 %defattr(644, root, root, 755)
142 %doc %{_docdir}/%{name}-%{version}
143 %dir %{_myadminpath}
144 %attr(640,root,apache) %config(noreplace) %verify(not size mtime md5) %{_myadminpath}/config.inc.php
145 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/conf.d/*
148 %changelog
149 * Thu Feb 23 2006 Patrick Monnerat <pm@datasphere.ch>
150 - Version 2.8.0-rc1.1.
152 * Thu Dec 22 2005 Patrick Monnerat <patrick.monnerat@econophone.ch>
153 - Path "nullpw" to allow trying connection with null password after failure.
154 - Version 2.7.0-pl1.1.
156 * Mon Aug 22 2005 Patrick Monnerat <patrick.monnerat@econophone.ch>
157 - Version 2.6.3-pl1.
159 * Wed Jul 21 2004 Patrick Monnerat <patrick.monnerat@econophone.ch>
160 - Version 2.5.7-pl1.
162 * Fri Nov 22 2002 Patrick Monnerat <patrick.monnerat@econophone.ch>
163 - Version 2.3.0-rc1.