1 %define _ver %(echo %{version} | tr -d .)
2 Summary: Multi-purpose fully-featured and integrated web picture gallery script
3 Summary(pl.UTF-8): W pełni funkcjonalny skrypt do galerii obrazków na WWW
4 Name: coppermine-gallery
8 Group: Applications/Publishing
9 Source0: http://dl.sourceforge.net/coppermine/cpg%{version}.zip
10 # Source0-md5: d990d54a00a1ced9e69fab18a7a554de
11 Source1: %{name}-apache.conf
12 Source2: %{name}-httpd.conf
13 Patch0: %{name}-typo.patch
14 Patch1: %{name}-pld.patch
15 URL: http://coppermine-gallery.net/
16 BuildRequires: rpmbuild(macros) >= 1.268
20 Requires: webserver(php) >= 4.1.0
21 #Suggests: Imagemagick
23 Conflicts: apache-base < 2.4.0-1
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define _webapps /etc/webapps
28 %define _webapp %{name}
29 %define _sysconfdir %{_webapps}/%{_webapp}
30 %define _appdir %{_datadir}/%{_webapp}
33 Coppermine Photo Gallery is an advanced, user-friendly, picture
34 gallery script with built-in support for other multi-media/data files.
36 The gallery can be private, accessible to registered users only,
37 and/or open to all visitors to your site. Users, if permitted, can
38 upload pictures with their web browser (thumbnail and intermediate
39 sized images are created on the fly), rate pictures, add comments and
42 The site administrator determines which of the features listed above
43 are accessible by registered and non-registered users. The site
44 administrator can also manage galleries and batch process large
45 numbers of pictures that have been uploaded onto the server by FTP.
47 %description -l pl.UTF-8
48 Coppermine Photo Gallery to zaawansowany, przyjazny dla użytkownika
49 skrypt do galerii obrazków z wbudowaną obsługą innych plików
50 multimedialnych lub z danymi.
52 Galerie mogą być prywatne, dostępne tylko dla zarejestrowanych
53 użytkowników i/lub otwarte dla wszystkich gości. Użytkownicy, jeśli
54 mają do tego uprawnienia, mogą umieszczać obrazki przy użyciu swojej
55 przeglądarki (miniaturki i obrazki o pośrednim rozmiarze są tworzone w
56 locie), oceniać obrazki, dodawać komentarze, a nawet wysyłać e-kartki.
58 Administrator serwisu określa, które z wyżej wymienionych opcji są
59 dostępne dla zarejestrowanych i niezarejestrowanych użytkowników. Może
60 także zarządzać galeriami i wsadowo przetwarzać dużą liczbę obrazków
61 umieszczonych na serwerze przez FTP.
64 Summary: Coppermine Gallery setup package
65 Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Coppermine Gallery
66 Group: Applications/WWW
67 Requires: %{name} = %{version}-%{release}
70 Install this package to configure initial Coppermine Gallery
71 installation. You should uninstall this package when you're done, as
72 it considered insecure to keep the setup files in place.
74 %description setup -l pl.UTF-8
75 Ten pakiet należy zainstalować w celu wstępnej konfiguracji Coppermine
76 Gallery Eventum po pierwszej instalacji. Potem należy go odinstalować,
77 jako że pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
81 rm -f upgrade-1.0-to-1.2.php
83 find '(' -name '*.php' -o -name '*.css' -o -name '*.js' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}} \
90 $RPM_BUILD_ROOT/var/lib/%{name}/albums/{edit,userpics}
92 cp -a *.{php,js,css} $RPM_BUILD_ROOT%{_appdir}
93 cp -a bridge docs images include lang logs plugins sql themes $RPM_BUILD_ROOT%{_appdir}
94 ln -s /var/lib/%{name}/albums $RPM_BUILD_ROOT%{_appdir}/albums
96 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
97 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
98 touch $RPM_BUILD_ROOT%{_sysconfdir}/config.inc.php
99 touch $RPM_BUILD_ROOT%{_sysconfdir}/install.lock
102 rm -rf $RPM_BUILD_ROOT
105 chmod 770 %{_sysconfdir}
106 chmod 660 %{_sysconfdir}/config.inc.php
107 if [ "$1" = 1 ]; then
108 %banner -e %{name}-setup <<EOF
109 You will need to create MySQL database and grant access to it:
110 $ mysqladmin create cpq
111 mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE ON cpg.* TO cpg@localhost IDENTIFIED BY 'PASSWORD';
113 You should install ImageMagic or php-gd for image conversions.
118 if [ "$1" = "0" ]; then
119 chmod 750 %{_sysconfdir}
120 chown root:http %{_sysconfdir}/config.inc.php
121 chmod 640 %{_sysconfdir}/config.inc.php
124 %triggerin -- apache1 < 1.3.37-3, apache1-base
125 %webapp_register apache %{_webapp}
127 %triggerun -- apache1 < 1.3.37-3, apache1-base
128 %webapp_unregister apache %{_webapp}
130 %triggerin -- apache-base
131 %webapp_register httpd %{_webapp}
133 %triggerun -- apache-base
134 %webapp_unregister httpd %{_webapp}
137 %defattr(644,root,root,755)
138 %doc README.txt CHANGELOG
139 %dir %attr(750,root,http) %{_sysconfdir}
140 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
141 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
142 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.inc.php
143 %ghost %{_sysconfdir}/install.lock
147 %exclude %{_appdir}/install.php
158 %dir %attr(710,root,http) /var/lib/%{name}
159 %dir %attr(730,root,http) /var/lib/%{name}/albums
160 %dir %attr(730,root,http) /var/lib/%{name}/albums/edit
161 %dir %attr(730,root,http) /var/lib/%{name}/albums/userpics
164 %defattr(644,root,root,755)
165 %{_appdir}/install.php
166 %{_appdir}/installer.css