]> git.pld-linux.org Git - SPECS.git/blob - phpMyBackupPro.spec
SPECS updated Sat 31 Jul 21:27:02 CEST 2021
[SPECS.git] / phpMyBackupPro.spec
1 # TODO
2 # - unpackaged: /usr/share/phpMyBackupPro/images/favicon.png
3 Summary:        Web-based MySQL backup program, written in PHP
4 Summary(pl.UTF-8):      Oparty o PHP program do tworzenia kopii zapasowych baz MySQL
5 Name:           phpMyBackupPro
6 Version:        2.1
7 Release:        1
8 License:        GPL
9 Group:          Applications/WWW
10 Source0:        http://dl.sourceforge.net/phpmybackup/%{name}.v.%{version}.zip
11 # Source0-md5:  4f6371ec453d180585c657da9cf73c56
12 Source1:        %{name}.conf
13 Source2:        %{name}_lighttpd.conf
14 URL:            http://www.phpmybackuppro.net/
15 BuildRequires:  unzip
16 Requires:       php(mysql)
17 Requires:       php(pcre)
18 Requires:       webserver
19 Requires:       webserver(php)
20 Requires:       webapps
21 BuildArch:      noarch
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _mybackupdir    %{_datadir}/%{name}
25 %define         _webapps                /etc/webapps
26 %define         _webapp                 %{name}
27 %define         _sysconfdir             %{_webapps}/%{_webapp}
28
29 %description
30 phpMyBackupPro is a web-based MySQL backup program, written in PHP.
31 You can schedule backups, email or upload them using FTP and backup
32 your data or structure or both. It comes with an easy to use
33 interface, an easy install and config and an online help.
34
35 %description -l pl.UTF-8
36 phpMyBackupPro to oparty o PHP program do tworzenia kopii zapasowych
37 baz MySQL. Posiada wiele możliwości takich jak: kolejkowanie,
38 wysyłanie za pomocą e-maila lub FTP, archiwizacja danych zawartych w
39 bazie, struktury bazy lub obydwu. Wyposażony został w bardzo
40 przejrzysty i łatwy w użyciu interfejs oraz intuicyjną instalację i
41 konfigurację programu.
42
43 %prep
44 %setup -q -c
45
46 %install
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT%{_mybackupdir} \
49         $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
50
51 cp -af %{name}/* $RPM_BUILD_ROOT%{_mybackupdir}
52 rm -f $RPM_BUILD_ROOT%{_mybackupdir}/config.php $RPM_BUILD_ROOT%{_mybackupdir}/global_conf.php
53
54 install %{name}/global_conf.php %{name}/config.php $RPM_BUILD_ROOT%{_sysconfdir}
55 ln -sf %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_mybackupdir}/config.php
56 ln -sf %{_sysconfdir}/global_conf.php $RPM_BUILD_ROOT%{_mybackupdir}/global_conf.php
57
58 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
59 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
60 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %triggerin -- apache < 2.2.0, apache-base
66 %webapp_register httpd %{_webapp}
67
68 %triggerun -- apache < 2.2.0, apache-base
69 %webapp_unregister httpd %{_webapp}
70
71 %triggerin -- lighttpd
72 %webapp_register lighttpd %{_webapp}
73
74 %triggerun -- lighttpd
75 %webapp_unregister lighttpd %{_webapp}
76
77 %triggerpostun -- %{name} < 6.5-2.1
78 # nuke very-old config location (this mostly for Ra)
79 if [ -f /etc/httpd/httpd.conf ]; then
80         sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
81 fi
82
83 # migrate from httpd (apache2) config dir
84 if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then
85         cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
86         mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf
87 fi
88
89 # migrate from apache-config macros
90 if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
91         if [ -d /etc/httpd/webapps.d ]; then
92                 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
93                 cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
94         fi
95         rm -f /etc/%{name}/apache.conf.rpmsave
96 fi
97
98 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
99 /usr/sbin/webapp register httpd %{_webapp}
100 %service -q httpd reload
101
102 %files
103 %defattr(644,root,root,755)
104 %doc documentation/{GNU\ GPL.txt,INSTALL.txt,HISTORY.txt,SEVERAL_SERVERS.txt,SHELL_MODE.txt,UPGRADE.txt}
105 %dir %{_sysconfdir}
106 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
107 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
108 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
109 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
110 %dir %{_mybackupdir}
111 %{_mybackupdir}/export
112 %{_mybackupdir}/language
113 %{_mybackupdir}/*.php
114 %{_mybackupdir}/stylesheets
115 %{_mybackupdir}/javascripts.js
116 %dir %{_mybackupdir}/images
117 %{_mybackupdir}/images/*.gif
118 %{_mybackupdir}/images/logo.png
This page took 0.398198 seconds and 3 git commands to generate.