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