]> git.pld-linux.org Git - packages/coppermine-gallery.git/blame - coppermine-gallery.spec
- upgrade to 1.4.14 (sec fixes!),
[packages/coppermine-gallery.git] / coppermine-gallery.spec
CommitLineData
e9c85d90
ER
1%define _ver %(echo %{version} | tr -d .)
2Summary: Multi-purpose fully-featured and integrated web picture gallery script
774f643e 3Summary(pl.UTF-8): W pełni funkcjonalny skrypt do galerii obrazków na WWW
e9c85d90 4Name: coppermine-gallery
cdef7d5b
TP
5Version: 1.4.14
6Release: 1
e9c85d90
ER
7License: GPL v2+
8Group: Applications/Publishing
cdef7d5b
TP
9Source0: http://dl.sourceforge.net/coppermine/cpg%{_ver}.zip
10# Source0-md5: 17f65c963bb5a6026491f783c59e19bf
e9c85d90
ER
11Source1: %{name}-apache.conf
12Patch0: %{name}-typo.patch
13Patch1: %{name}-pld.patch
14URL: http://coppermine-gallery.net/
15BuildRequires: rpmbuild(macros) >= 1.268
2966ea12 16BuildRequires: unzip
8174dcb0 17Requires: php(mysql)
e9c85d90 18Requires: webapps
8174dcb0 19Requires: webserver(php) >= 4.1.0
e9c85d90 20#Suggests: Imagemagick
90a0b61e 21#Suggests: php-gd
e9c85d90
ER
22BuildArch: noarch
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%define _webapps /etc/webapps
26%define _webapp %{name}
27%define _sysconfdir %{_webapps}/%{_webapp}
28%define _appdir %{_datadir}/%{_webapp}
29
30%description
31Coppermine Photo Gallery is an advanced, user-friendly, picture
32gallery script with built-in support for other multi-media/data files.
33
34The gallery can be private, accessible to registered users only,
35and/or open to all visitors to your site. Users, if permitted, can
36upload pictures with their web browser (thumbnail and intermediate
37sized images are created on the fly), rate pictures, add comments and
38even send e-cards.
39
40The site administrator determines which of the features listed above
41are accessible by registered and non-registered users. The site
42administrator can also manage galleries and batch process large
43numbers of pictures that have been uploaded onto the server by FTP.
44
2e12f667
JR
45%description -l pl.UTF-8
46Coppermine Photo Gallery to zaawansowany, przyjazny dla użytkownika
47skrypt do galerii obrazków z wbudowaną obsługą innych plików
90a0b61e
JB
48multimedialnych lub z danymi.
49
2e12f667
JR
50Galerie mogą być prywatne, dostępne tylko dla zarejestrowanych
51użytkowników i/lub otwarte dla wszystkich gości. Użytkownicy, jeśli
52mają do tego uprawnienia, mogą umieszczać obrazki przy użyciu swojej
53przeglądarki (miniaturki i obrazki o pośrednim rozmiarze są tworzone w
54locie), oceniać obrazki, dodawać komentarze, a nawet wysyłać e-kartki.
90a0b61e 55
2e12f667
JR
56Administrator serwisu określa, które z wyżej wymienionych opcji są
57dostępne dla zarejestrowanych i niezarejestrowanych użytkowników. Może
58także zarządzać galeriami i wsadowo przetwarzać dużą liczbę obrazków
90a0b61e
JB
59umieszczonych na serwerze przez FTP.
60
e9c85d90
ER
61%package setup
62Summary: Coppermine Gallery setup package
774f643e 63Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Coppermine Gallery
e9c85d90
ER
64Group: Applications/WWW
65Requires: %{name} = %{version}-%{release}
66
67%description setup
90a0b61e
JB
68Install this package to configure initial Coppermine Gallery
69installation. You should uninstall this package when you're done, as
70it considered insecure to keep the setup files in place.
e9c85d90 71
2e12f667
JR
72%description setup -l pl.UTF-8
73Ten pakiet należy zainstalować w celu wstępnej konfiguracji Coppermine
74Gallery Eventum po pierwszej instalacji. Potem należy go odinstalować,
75jako że pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
e9c85d90
ER
76
77%prep
78%setup -q -n cpg%{_ver}
79rm -f upgrade-1.0-to-1.2.php
80# undos the source
81find '(' -name '*.php' -o -name '*.css' -o -name '*.js' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
82%patch0 -p1
83%patch1 -p1
84
85%install
86rm -rf $RPM_BUILD_ROOT
87install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}} \
88 $RPM_BUILD_ROOT/var/lib/%{name}/albums/{edit,userpics}
89
90cp -a *.{php,js,css} $RPM_BUILD_ROOT%{_appdir}
5e2c467d
ER
91cp -a bridge images include lang logs plugins sql themes $RPM_BUILD_ROOT%{_appdir}
92ln -s /var/lib/%{name}/albums $RPM_BUILD_ROOT%{_appdir}/albums
e9c85d90
ER
93
94install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
95install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
96touch $RPM_BUILD_ROOT%{_sysconfdir}/config.inc.php
97touch $RPM_BUILD_ROOT%{_sysconfdir}/install.lock
98
99%clean
100rm -rf $RPM_BUILD_ROOT
101
102%post setup
103chmod 770 %{_sysconfdir}
104chmod 660 %{_sysconfdir}/config.inc.php
105if [ "$1" = 1 ]; then
106%banner -e %{name}-setup <<EOF
107You will need to create MySQL database and grant access to it:
108$ mysqladmin create cpq
109mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE ON cpg.* TO cpg@localhost IDENTIFIED BY 'PASSWORD';
110
111You should install ImageMagic or php-gd for image conversions.
112EOF
113fi
114
115%postun setup
116if [ "$1" = "0" ]; then
117 chmod 750 %{_sysconfdir}
118 chown root:http %{_sysconfdir}/config.inc.php
119 chmod 640 %{_sysconfdir}/config.inc.php
120fi
121
92458687 122%triggerin -- apache1 < 1.3.37-3, apache1-base
e9c85d90
ER
123%webapp_register apache %{_webapp}
124
92458687 125%triggerun -- apache1 < 1.3.37-3, apache1-base
e9c85d90
ER
126%webapp_unregister apache %{_webapp}
127
128%triggerin -- apache < 2.2.0, apache-base
129%webapp_register httpd %{_webapp}
130
131%triggerun -- apache < 2.2.0, apache-base
132%webapp_unregister httpd %{_webapp}
133
134%files
135%defattr(644,root,root,755)
0f4df7a0 136%doc README.txt CHANGELOG docs
e9c85d90
ER
137%dir %attr(750,root,http) %{_sysconfdir}
138%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
139%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
140%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.inc.php
141%ghost %{_sysconfdir}/install.lock
142%dir %{_appdir}
143%{_appdir}/*.php
144%{_appdir}/*.js
145%exclude %{_appdir}/install.php
146%{_appdir}/albums
147%{_appdir}/bridge
148%{_appdir}/images
149%{_appdir}/include
150%{_appdir}/lang
151%{_appdir}/logs
152%{_appdir}/plugins
153%{_appdir}/themes
154
cdef7d5b
TP
155%dir %attr(710,root,http) /var/lib/%{name}
156%dir %attr(730,root,http) /var/lib/%{name}/albums
157%dir %attr(730,root,http) /var/lib/%{name}/albums/edit
158%dir %attr(730,root,http) /var/lib/%{name}/albums/userpics
e9c85d90
ER
159
160%files setup
161%defattr(644,root,root,755)
162%{_appdir}/install.php
163%{_appdir}/installer.css
164%{_appdir}/sql
This page took 0.08929 seconds and 4 git commands to generate.