1 Summary: Web based photo album viewer and creator
2 Summary(pl.UTF-8): Przeglądarka i generator albumów zdjęć w postaci stron WWW
7 Group: Applications/Publishing
8 Source0: http://dl.sourceforge.net/gallery/%{name}-%{version}.tar.gz
9 # Source0-md5: a8147e62b248baf25cdd2a79a63453eb
10 Source1: http://dl.sourceforge.net/gallery/pl_PL-1.5.2.tar.gz
11 # Source1-md5: 1dd07a63d96299d8f5e4cc03342d318e
12 Source2: %{name}-apache.conf
13 Patch0: %{name}-PLD.patch
14 URL: http://gallery.menalto.com/
15 BuildRequires: rpmbuild(macros) >= 1.268
16 Requires: php(gettext)
18 Requires: webserver(php) >= 4.1.0
19 #Suggests: apache(mod_rewrite)
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define _webapps /etc/webapps
26 %define _webapp %{name}
27 %define _sysconfdir %{_webapps}/%{_webapp}
28 %define _appdir %{_datadir}/%{_webapp}
31 Gallery is a photo album that includes a config wizard and lets users
32 create and maintain albums via an intuitive Web interface. Photo
33 management includes automatic thumbnail creation, image resizing,
34 rotation, ordering and more. Albums can have read, write, and caption
35 permissions per individual.
37 %description -l pl.UTF-8
38 Gallery jest albumem zdjęć, który posiadaj kreatora konfiguracji i
39 pozwala użytkownikom tworzyć i zarządzać albumami przez intuicyjny
40 interfejs WWW. Zarządzanie zdjęciami umożliwia automatyczne tworzenie
41 miniatur, zmianę wielkości obrazów, obrót, zmianę kolejności
42 wyświetlania, itp. Albumy mogą posiadać indywidualne uprawnienia.
45 Summary: Gallery setup package
46 Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Gallery
47 Group: Applications/WWW
48 Requires: %{name} = %{version}-%{release}
51 Install this package to configure initial Gallery installation. You
52 should uninstall this package when you're done, as it considered
53 insecure to keep the setup files in place.
55 %description setup -l pl.UTF-8
56 Ten pakiet należy zainstalować w celu wstępnej konfigurac Gallery po
57 pierwszej instalacji. Potem należy go odinstalować, jako że
58 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
64 tar zxf %{SOURCE1} -C locale
65 rm -f LICENSE.txt *.bat
67 # cleanup backups after patching
68 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},/var/lib/gallery/albums}
74 cp -a *.{php,inc,sh} $RPM_BUILD_ROOT%{_appdir}
75 cp -a classes contrib css docs help html html_wrap images $RPM_BUILD_ROOT%{_appdir}
76 cp -a includes java js layout lib locale platform skins tools $RPM_BUILD_ROOT%{_appdir}
77 # in /var because of setup/resetadmin file
78 cp -a setup $RPM_BUILD_ROOT/var/lib/gallery
79 ln -s /var/lib/gallery/setup $RPM_BUILD_ROOT%{_appdir}
80 ln -s %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}/config.php
81 rm -f $RPM_BUILD_ROOT%{_appdir}/{AUTHORS,ChangeLog*,README}
83 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
84 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
85 touch $RPM_BUILD_ROOT%{_sysconfdir}/config.php
86 touch $RPM_BUILD_ROOT%{_sysconfdir}/htaccess
87 ln -s %{_sysconfdir}/htaccess $RPM_BUILD_ROOT%{_appdir}/.htaccess
90 rm -rf $RPM_BUILD_ROOT
92 %triggerin -- apache1 < 1.3.37-3, apache1-base
93 %webapp_register apache %{_webapp}
95 %triggerun -- apache1 < 1.3.37-3, apache1-base
96 %webapp_unregister apache %{_webapp}
98 %triggerin -- apache < 2.2.0, apache-base
99 %webapp_register httpd %{_webapp}
101 %triggerun -- apache < 2.2.0, apache-base
102 %webapp_unregister httpd %{_webapp}
104 %triggerpostun -- %{name} < 1.5.2-0.13
105 /usr/sbin/webapp register httpd %{_webapp}
106 %service -q httpd reload
109 %defattr(644,root,root,755)
110 %doc AUTHORS ChangeLog* README
111 %dir %attr(750,root,http) %{_sysconfdir}
112 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
113 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
114 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
115 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/htaccess
117 %dir /var/lib/gallery
118 %dir %attr(770,root,http) /var/lib/gallery/albums
138 %dir %{_appdir}/locale
139 %{_appdir}/locale/en_US
140 %lang(pl) %{_appdir}/locale/pl_PL
143 %defattr(644,root,root,755)
144 %attr(755,root,root) %{_appdir}/*.sh
146 %{_appdir}/config.php
147 /var/lib/gallery/setup