1 %define _ver %(echo %{version} | tr -d .)
2 Summary: Multi-purpose fully-featured and integrated web picture gallery script
3 Summary(pl): 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: c90849b6a47964e0c55d45daa427ff3c
11 Source1: %{name}-apache.conf
12 Patch0: %{name}-typo.patch
13 Patch1: %{name}-pld.patch
14 URL: http://coppermine-gallery.net/
15 BuildRequires: rpmbuild(macros) >= 1.268
16 Requires: php >= 3:4.1.0
19 #Suggests: Imagemagick
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define _webapps /etc/webapps
25 %define _webapp %{name}
26 %define _sysconfdir %{_webapps}/%{_webapp}
27 %define _appdir %{_datadir}/%{_webapp}
30 Coppermine Photo Gallery is an advanced, user-friendly, picture
31 gallery script with built-in support for other multi-media/data files.
33 The gallery can be private, accessible to registered users only,
34 and/or open to all visitors to your site. Users, if permitted, can
35 upload pictures with their web browser (thumbnail and intermediate
36 sized images are created on the fly), rate pictures, add comments and
39 The site administrator determines which of the features listed above
40 are accessible by registered and non-registered users. The site
41 administrator can also manage galleries and batch process large
42 numbers of pictures that have been uploaded onto the server by FTP.
45 Coppermine Photo Gallery to zaawansowany, przyjazny dla u¿ytkownika
46 skrypt do galerii obrazków z wbudowan± obs³ug± innych plików
47 multimedialnych lub z danymi.
49 Galerie mog± byæ prywatne, dostêpne tylko dla zarejestrowanych
50 u¿ytkowników i/lub otwarte dla wszystkich go¶ci. U¿ytkownicy, je¶li
51 maj± do tego uprawnienia, mog± umieszczaæ obrazki przy u¿yciu swojej
52 przegl±darki (miniaturki i obrazki o po¶rednim rozmiarze s± tworzone w
53 locie), oceniaæ obrazki, dodawaæ komentarze, a nawet wysy³aæ e-kartki.
55 Administrator serwisu okre¶la, które z wy¿ej wymienionych opcji s±
56 dostêpne dla zarejestrowanych i niezarejestrowanych u¿ytkowników. Mo¿e
57 tak¿e zarz±dzaæ galeriami i wsadowo przetwarzaæ du¿± liczbê obrazków
58 umieszczonych na serwerze przez FTP.
61 Summary: Coppermine Gallery setup package
62 Summary(pl): Pakiet do wstêpnej konfiguracji Coppermine Gallery
63 Group: Applications/WWW
64 Requires: %{name} = %{version}-%{release}
67 Install this package to configure initial Coppermine Gallery
68 installation. You should uninstall this package when you're done, as
69 it considered insecure to keep the setup files in place.
71 %description setup -l pl
72 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Coppermine
73 Gallery Eventum po pierwszej instalacji. Potem nale¿y go odinstalowaæ,
74 jako ¿e pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
77 %setup -q -n cpg%{_ver}
78 rm -f upgrade-1.0-to-1.2.php
80 find '(' -name '*.php' -o -name '*.css' -o -name '*.js' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}} \
87 $RPM_BUILD_ROOT/var/lib/%{name}/albums/{edit,userpics}
89 cp -a *.{php,js,css} $RPM_BUILD_ROOT%{_appdir}
90 cp -a bridge images include lang logs plugins sql themes $RPM_BUILD_ROOT%{_appdir}
91 ln -s /var/lib/%{name}/albums $RPM_BUILD_ROOT%{_appdir}/albums
93 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
94 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
95 touch $RPM_BUILD_ROOT%{_sysconfdir}/config.inc.php
96 touch $RPM_BUILD_ROOT%{_sysconfdir}/install.lock
99 rm -rf $RPM_BUILD_ROOT
102 chmod 770 %{_sysconfdir}
103 chmod 660 %{_sysconfdir}/config.inc.php
104 if [ "$1" = 1 ]; then
105 %banner -e %{name}-setup <<EOF
106 You will need to create MySQL database and grant access to it:
107 $ mysqladmin create cpq
108 mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE ON cpg.* TO cpg@localhost IDENTIFIED BY 'PASSWORD';
110 You should install ImageMagic or php-gd for image conversions.
115 if [ "$1" = "0" ]; then
116 chmod 750 %{_sysconfdir}
117 chown root:http %{_sysconfdir}/config.inc.php
118 chmod 640 %{_sysconfdir}/config.inc.php
121 %triggerin -- apache1 < 1.3.37-3, apache1-base
122 %webapp_register apache %{_webapp}
124 %triggerun -- apache1 < 1.3.37-3, apache1-base
125 %webapp_unregister apache %{_webapp}
127 %triggerin -- apache < 2.2.0, apache-base
128 %webapp_register httpd %{_webapp}
130 %triggerun -- apache < 2.2.0, apache-base
131 %webapp_unregister httpd %{_webapp}
134 %defattr(644,root,root,755)
135 %doc README.txt CHANGELOG
136 %dir %attr(750,root,http) %{_sysconfdir}
137 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
138 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
139 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.inc.php
140 %ghost %{_sysconfdir}/install.lock
144 %exclude %{_appdir}/install.php
154 %dir /var/lib/%{name}
155 %dir %attr(770,root,http) /var/lib/%{name}/albums
156 %dir %attr(770,root,http) /var/lib/%{name}/albums/edit
157 %dir %attr(770,root,http) /var/lib/%{name}/albums/userpics
160 %defattr(644,root,root,755)
161 %{_appdir}/install.php
162 %{_appdir}/installer.css