]> git.pld-linux.org Git - packages/coppermine-gallery.git/blob - coppermine-gallery.spec
- upgrade to 1.4.14 (sec fixes!),
[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.14
6 Release:        1
7 License:        GPL v2+
8 Group:          Applications/Publishing
9 Source0:        http://dl.sourceforge.net/coppermine/cpg%{_ver}.zip
10 # Source0-md5:  17f65c963bb5a6026491f783c59e19bf
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 BuildRequires:  unzip
17 Requires:       php(mysql)
18 Requires:       webapps
19 Requires:       webserver(php) >= 4.1.0
20 #Suggests:      Imagemagick
21 #Suggests:      php-gd
22 BuildArch:      noarch
23 BuildRoot:      %{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
31 Coppermine Photo Gallery is an advanced, user-friendly, picture
32 gallery script with built-in support for other multi-media/data files.
33
34 The gallery can be private, accessible to registered users only,
35 and/or open to all visitors to your site. Users, if permitted, can
36 upload pictures with their web browser (thumbnail and intermediate
37 sized images are created on the fly), rate pictures, add comments and
38 even send e-cards.
39
40 The site administrator determines which of the features listed above
41 are accessible by registered and non-registered users. The site
42 administrator can also manage galleries and batch process large
43 numbers of pictures that have been uploaded onto the server by FTP.
44
45 %description -l pl.UTF-8
46 Coppermine Photo Gallery to zaawansowany, przyjazny dla użytkownika
47 skrypt do galerii obrazków z wbudowaną obsługą innych plików
48 multimedialnych lub z danymi.
49
50 Galerie mogą być prywatne, dostępne tylko dla zarejestrowanych
51 użytkowników i/lub otwarte dla wszystkich gości. Użytkownicy, jeśli
52 mają do tego uprawnienia, mogą umieszczać obrazki przy użyciu swojej
53 przeglądarki (miniaturki i obrazki o pośrednim rozmiarze są tworzone w
54 locie), oceniać obrazki, dodawać komentarze, a nawet wysyłać e-kartki.
55
56 Administrator serwisu określa, które z wyżej wymienionych opcji są
57 dostępne dla zarejestrowanych i niezarejestrowanych użytkowników. Może
58 także zarządzać galeriami i wsadowo przetwarzać dużą liczbę obrazków
59 umieszczonych na serwerze przez FTP.
60
61 %package setup
62 Summary:        Coppermine Gallery setup package
63 Summary(pl.UTF-8):      Pakiet do wstępnej konfiguracji Coppermine Gallery
64 Group:          Applications/WWW
65 Requires:       %{name} = %{version}-%{release}
66
67 %description setup
68 Install this package to configure initial Coppermine Gallery
69 installation. You should uninstall this package when you're done, as
70 it considered insecure to keep the setup files in place.
71
72 %description setup -l pl.UTF-8
73 Ten pakiet należy zainstalować w celu wstępnej konfiguracji Coppermine
74 Gallery Eventum po pierwszej instalacji. Potem należy go odinstalować,
75 jako że pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
76
77 %prep
78 %setup -q -n cpg%{_ver}
79 rm -f upgrade-1.0-to-1.2.php
80 # undos the source
81 find '(' -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
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}} \
88         $RPM_BUILD_ROOT/var/lib/%{name}/albums/{edit,userpics}
89
90 cp -a *.{php,js,css} $RPM_BUILD_ROOT%{_appdir}
91 cp -a bridge images include lang logs plugins sql themes $RPM_BUILD_ROOT%{_appdir}
92 ln -s /var/lib/%{name}/albums $RPM_BUILD_ROOT%{_appdir}/albums
93
94 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
95 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
96 touch $RPM_BUILD_ROOT%{_sysconfdir}/config.inc.php
97 touch $RPM_BUILD_ROOT%{_sysconfdir}/install.lock
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %post setup
103 chmod 770 %{_sysconfdir}
104 chmod 660 %{_sysconfdir}/config.inc.php
105 if [ "$1" = 1 ]; then
106 %banner -e %{name}-setup <<EOF
107 You will need to create MySQL database and grant access to it:
108 $ mysqladmin create cpq
109 mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE ON cpg.* TO cpg@localhost IDENTIFIED BY 'PASSWORD';
110
111 You should install ImageMagic or php-gd for image conversions.
112 EOF
113 fi
114
115 %postun setup
116 if [ "$1" = "0" ]; then
117         chmod 750 %{_sysconfdir}
118         chown root:http %{_sysconfdir}/config.inc.php
119         chmod 640 %{_sysconfdir}/config.inc.php
120 fi
121
122 %triggerin -- apache1 < 1.3.37-3, apache1-base
123 %webapp_register apache %{_webapp}
124
125 %triggerun -- apache1 < 1.3.37-3, apache1-base
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)
136 %doc README.txt CHANGELOG docs
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
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
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.13496 seconds and 3 git commands to generate.