]> git.pld-linux.org Git - packages/coppermine-gallery.git/blob - coppermine-gallery.spec
5b6f89f8961ea59a71100514dc85896da6fe60b7
[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):    W pe³ni funkcjonalny skrypt do galerii obrazków na WWW
4 Name:           coppermine-gallery
5 Version:        1.4.5
6 Release:        0.8
7 License:        GPL v2+
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
17 Requires:       php-mysql
18 Requires:       webapps
19 #Suggests:      Imagemagick
20 #Suggests:      php-gd
21 BuildArch:      noarch
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _webapps        /etc/webapps
25 %define         _webapp         %{name}
26 %define         _sysconfdir     %{_webapps}/%{_webapp}
27 %define         _appdir %{_datadir}/%{_webapp}
28
29 %description
30 Coppermine Photo Gallery is an advanced, user-friendly, picture
31 gallery script with built-in support for other multi-media/data files.
32
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
37 even send e-cards.
38
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.
43
44 %description -l pl
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.
48
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.
54
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.
59
60 %package setup
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}
65
66 %description setup
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.
70
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.
75
76 %prep
77 %setup -q -n cpg%{_ver}
78 rm -f upgrade-1.0-to-1.2.php
79 # undos the source
80 find '(' -name '*.php' -o -name '*.css' -o -name '*.js' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
81 %patch0 -p1
82 %patch1 -p1
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}} \
87         $RPM_BUILD_ROOT/var/lib/%{name}/albums/{edit,userpics}
88
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
92
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
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %post setup
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';
109
110 You should install ImageMagic or php-gd for image conversions.
111 EOF
112 fi
113
114 %postun setup
115 if [ "$1" = "0" ]; then
116         chmod 750 %{_sysconfdir}
117         chown root:http %{_sysconfdir}/config.inc.php
118         chmod 640 %{_sysconfdir}/config.inc.php
119 fi
120
121 %triggerin -- apache1 < 1.3.37-3, apache1-base
122 %webapp_register apache %{_webapp}
123
124 %triggerun -- apache1 < 1.3.37-3, apache1-base
125 %webapp_unregister apache %{_webapp}
126
127 %triggerin -- apache < 2.2.0, apache-base
128 %webapp_register httpd %{_webapp}
129
130 %triggerun -- apache < 2.2.0, apache-base
131 %webapp_unregister httpd %{_webapp}
132
133 %files
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
141 %dir %{_appdir}
142 %{_appdir}/*.php
143 %{_appdir}/*.js
144 %exclude %{_appdir}/install.php
145 %{_appdir}/albums
146 %{_appdir}/bridge
147 %{_appdir}/images
148 %{_appdir}/include
149 %{_appdir}/lang
150 %{_appdir}/logs
151 %{_appdir}/plugins
152 %{_appdir}/themes
153
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
158
159 %files setup
160 %defattr(644,root,root,755)
161 %{_appdir}/install.php
162 %{_appdir}/installer.css
163 %{_appdir}/sql
This page took 0.143771 seconds and 2 git commands to generate.