]> git.pld-linux.org Git - packages/coppermine-gallery.git/blob - coppermine-gallery.spec
- migrate to apache 2.4
[packages/coppermine-gallery.git] / coppermine-gallery.spec
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
5 Version:        1.4.26
6 Release:        2
7 License:        GPL v2+
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
17 BuildRequires:  unzip
18 Requires:       php(mysql)
19 Requires:       webapps
20 Requires:       webserver(php) >= 4.1.0
21 #Suggests:      Imagemagick
22 #Suggests:      php-gd
23 Conflicts:      apache-base < 2.4.0-1
24 BuildArch:      noarch
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %define         _webapps        /etc/webapps
28 %define         _webapp         %{name}
29 %define         _sysconfdir     %{_webapps}/%{_webapp}
30 %define         _appdir %{_datadir}/%{_webapp}
31
32 %description
33 Coppermine Photo Gallery is an advanced, user-friendly, picture
34 gallery script with built-in support for other multi-media/data files.
35
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
40 even send e-cards.
41
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.
46
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.
51
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.
57
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.
62
63 %package setup
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}
68
69 %description setup
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.
73
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.
78
79 %prep
80 %setup -q -n cpg14x
81 rm -f upgrade-1.0-to-1.2.php
82 # undos the source
83 find '(' -name '*.php' -o -name '*.css' -o -name '*.js' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
84 %patch0 -p1
85 %patch1 -p1
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}} \
90         $RPM_BUILD_ROOT/var/lib/%{name}/albums/{edit,userpics}
91
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
95
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
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %post setup
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';
112
113 You should install ImageMagic or php-gd for image conversions.
114 EOF
115 fi
116
117 %postun setup
118 if [ "$1" = "0" ]; then
119         chmod 750 %{_sysconfdir}
120         chown root:http %{_sysconfdir}/config.inc.php
121         chmod 640 %{_sysconfdir}/config.inc.php
122 fi
123
124 %triggerin -- apache1 < 1.3.37-3, apache1-base
125 %webapp_register apache %{_webapp}
126
127 %triggerun -- apache1 < 1.3.37-3, apache1-base
128 %webapp_unregister apache %{_webapp}
129
130 %triggerin -- apache-base
131 %webapp_register httpd %{_webapp}
132
133 %triggerun -- apache-base
134 %webapp_unregister httpd %{_webapp}
135
136 %files
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
144 %dir %{_appdir}
145 %{_appdir}/*.php
146 %{_appdir}/*.js
147 %exclude %{_appdir}/install.php
148 %{_appdir}/albums
149 %{_appdir}/bridge
150 %{_appdir}/docs
151 %{_appdir}/images
152 %{_appdir}/include
153 %{_appdir}/lang
154 %{_appdir}/logs
155 %{_appdir}/plugins
156 %{_appdir}/themes
157
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
162
163 %files setup
164 %defattr(644,root,root,755)
165 %{_appdir}/install.php
166 %{_appdir}/installer.css
167 %{_appdir}/sql
This page took 0.061228 seconds and 3 git commands to generate.