]>
Commit | Line | Data |
---|---|---|
30bacd6a PG |
1 | # TODO: |
2 | # - use external libs, not the included ones: pear, smarty, adodb | |
3 | # - move to separate packages each: theme, module. | |
a90fe526 | 4 | Summary: Web based photo album viewer and creator |
58349555 | 5 | Summary(pl.UTF-8): Przeglądarka i generator albumów zdjęć w postaci stron WWW |
1c5b52f6 | 6 | Name: gallery |
136b7e47 | 7 | Version: 2.2.1 |
9527eb2c | 8 | Release: 1 |
dd29e0c0 | 9 | License: GPL |
4e8b9013 | 10 | Group: Applications/Publishing |
9527eb2c | 11 | Source0: http://dl.sourceforge.net/gallery/%{name}-%{version}-full.tar.gz |
136b7e47 | 12 | # Source0-md5: e4501a9cec700f238bddc5791fec0f8c |
9527eb2c | 13 | #Source0: http://galleryupdates.jpmullan.com/G2/%{name}-nightly.tar.gz |
30bacd6a | 14 | Source1: %{name}-apache.conf |
ecb3ab72 | 15 | Patch0: %{name}-setup.patch |
4e8b9013 | 16 | URL: http://gallery.sourceforge.net/ |
a90fe526 | 17 | BuildRequires: rpmbuild(macros) >= 1.268 |
289aabf5 ER |
18 | Requires: php(gettext) |
19 | Requires: php(pcre) | |
ecb3ab72 | 20 | Requires: webapps |
289aabf5 | 21 | Requires: webserver(php) >= 4.1.0 |
a90fe526 ER |
22 | #Suggests: apache(mod_rewrite) |
23 | #Suggests: jhead | |
24 | #Suggests: jpegtran | |
30bacd6a | 25 | #Suggests: php-gd |
4e8b9013 | 26 | BuildArch: noarch |
e8d7e6fe | 27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
1c5b52f6 | 28 | |
a90fe526 ER |
29 | %define _webapps /etc/webapps |
30 | %define _webapp %{name} | |
31 | %define _sysconfdir %{_webapps}/%{_webapp} | |
30bacd6a | 32 | %define _appdir %{_datadir}/%{_webapp} |
4e8b9013 | 33 | |
1c5b52f6 | 34 | %description |
4e8b9013 | 35 | Gallery is a photo album that includes a config wizard and lets users |
36 | create and maintain albums via an intuitive Web interface. Photo | |
37 | management includes automatic thumbnail creation, image resizing, | |
38 | rotation, ordering and more. Albums can have read, write, and caption | |
39 | permissions per individual. | |
1c5b52f6 | 40 | |
0bf5ac9a JR |
41 | %description -l pl.UTF-8 |
42 | Gallery jest albumem zdjęć, który posiadaj kreatora konfiguracji i | |
43 | pozwala użytkownikom tworzyć i zarządzać albumami przez intuicyjny | |
44 | interfejs WWW. Zarządzanie zdjęciami umożliwia automatyczne tworzenie | |
45 | miniatur, zmianę wielkości obrazów, obrót, zmianę kolejności | |
46 | wyświetlania, itp. Albumy mogą posiadać indywidualne uprawnienia. | |
1c5b52f6 | 47 | |
a90fe526 ER |
48 | %package setup |
49 | Summary: Gallery setup package | |
58349555 | 50 | Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Gallery |
a90fe526 ER |
51 | Group: Applications/WWW |
52 | Requires: %{name} = %{version}-%{release} | |
65a1fd75 | 53 | Conflicts: external-gallery-module |
a90fe526 ER |
54 | |
55 | %description setup | |
56 | Install this package to configure initial Gallery installation. You | |
57 | should uninstall this package when you're done, as it considered | |
58 | insecure to keep the setup files in place. | |
59 | ||
0bf5ac9a JR |
60 | %description setup -l pl.UTF-8 |
61 | Ten pakiet należy zainstalować w celu wstępnej konfiguracji Gallery po | |
62 | pierwszej instalacji. Potem należy go odinstalować, jako że | |
63 | pozostawienie plików instalacyjnych mogłoby być niebezpieczne. | |
a90fe526 | 64 | |
1c5b52f6 | 65 | %prep |
30bacd6a | 66 | %setup -q -n %{name}2 |
9527eb2c | 67 | %patch0 -p0 |
a90fe526 | 68 | |
a90fe526 | 69 | rm -f LICENSE.txt *.bat |
1c5b52f6 MM |
70 | |
71 | %install | |
1c5b52f6 | 72 | rm -rf $RPM_BUILD_ROOT |
a90fe526 | 73 | install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},/var/lib/gallery/albums} |
090d4c64 | 74 | |
30bacd6a | 75 | cp -a *.{php,inc} $RPM_BUILD_ROOT%{_appdir} |
2670940e | 76 | cp README.html $RPM_BUILD_ROOT%{_appdir} |
30bacd6a PG |
77 | cp -a images lib modules themes $RPM_BUILD_ROOT%{_appdir} |
78 | cp -a install upgrade $RPM_BUILD_ROOT%{_appdir} | |
a90fe526 | 79 | |
30bacd6a PG |
80 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf |
81 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
a90fe526 | 82 | touch $RPM_BUILD_ROOT%{_sysconfdir}/config.php |
30bacd6a PG |
83 | touch $RPM_BUILD_ROOT%{_sysconfdir}/login.txt |
84 | ln -s %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}/config.php | |
85 | ln -s %{_sysconfdir}/login.txt $RPM_BUILD_ROOT%{_appdir}/login.txt | |
1c5b52f6 | 86 | |
23884506 | 87 | ## Cleanup modules that are avaible in separate packages: |
136b7e47 RT |
88 | #for module in exif; do |
89 | # rm -rf $RPM_BUILD_ROOT%{_appdir}/modules/$module | |
90 | #done | |
23884506 | 91 | |
1c5b52f6 MM |
92 | %clean |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
7bb165cf | 95 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
a90fe526 ER |
96 | %webapp_register apache %{_webapp} |
97 | ||
7bb165cf | 98 | %triggerun -- apache1 < 1.3.37-3, apache1-base |
a90fe526 ER |
99 | %webapp_unregister apache %{_webapp} |
100 | ||
d81157f0 | 101 | %triggerin -- apache < 2.2.0, apache-base |
a90fe526 ER |
102 | %webapp_register httpd %{_webapp} |
103 | ||
d81157f0 | 104 | %triggerun -- apache < 2.2.0, apache-base |
a90fe526 ER |
105 | %webapp_unregister httpd %{_webapp} |
106 | ||
107 | %triggerpostun -- %{name} < 1.5.2-0.13 | |
108 | /usr/sbin/webapp register httpd %{_webapp} | |
109 | %service -q httpd reload | |
110 | ||
4e8b9013 | 111 | %files |
dd29e0c0 | 112 | %defattr(644,root,root,755) |
30bacd6a | 113 | %doc README* |
a90fe526 | 114 | %dir %attr(750,root,http) %{_sysconfdir} |
7b9b7366 | 115 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/login.txt |
a90fe526 ER |
116 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf |
117 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
118 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php | |
a90fe526 ER |
119 | %dir %{_appdir} |
120 | %dir /var/lib/gallery | |
121 | %dir %attr(770,root,http) /var/lib/gallery/albums | |
7b9b7366 | 122 | %{_appdir}/login.txt |
a90fe526 ER |
123 | %{_appdir}/*.php |
124 | %{_appdir}/*.inc | |
a90fe526 | 125 | %{_appdir}/images |
a90fe526 | 126 | %{_appdir}/lib |
30bacd6a PG |
127 | %{_appdir}/modules |
128 | %{_appdir}/themes | |
a90fe526 ER |
129 | |
130 | %files setup | |
131 | %defattr(644,root,root,755) | |
2670940e | 132 | %{_appdir}/README.html |
ba160d9e | 133 | %{_appdir}/config.php |
30bacd6a | 134 | %{_appdir}/install |
8c69bded | 135 | %{_appdir}/upgrade |