]> git.pld-linux.org Git - packages/gallery.git/blob - gallery.spec
- updated to 1.5.2, fixes cross-site scripting vulnerability
[packages/gallery.git] / gallery.spec
1 Summary:        Web based photo album viewer and creator
2 Summary(pl):    Przegl±darka i generator albumów zdjêæ w postaci stron WWW
3 Name:           gallery
4 Version:        1.5.2
5 Release:        1
6 License:        GPL
7 Group:          Applications/Publishing
8 Source0:        http://dl.sourceforge.net/gallery/%{name}-%{version}.tar.gz
9 # Source0-md5:  6156b335a712d5515c3cc84c6bcd77da
10 Source1:        http://dl.sourceforge.net/gallery/pl_PL-1.5.1.tar.gz
11 # Source1-md5:  efe8e359041c2c07463132ad0f7a8bea
12 Source2:        %{name}-apache.conf
13 Patch0:         %{name}-PLD.patch
14 URL:            http://gallery.sourceforge.net/
15 BuildRequires:  rpmbuild(macros) >= 1.268
16 Requires:       webapps
17 Requires:       php-gettext
18 Requires:       php >= 3:4.1.0
19 #Suggests:      apache(mod_rewrite)
20 #Suggests:      jhead
21 #Suggests:      jpegtran
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 Gallery is a photo album that includes a config wizard and lets users
32 create and maintain albums via an intuitive Web interface. Photo
33 management includes automatic thumbnail creation, image resizing,
34 rotation, ordering and more. Albums can have read, write, and caption
35 permissions per individual.
36
37 %description -l pl
38 Gallery jest albumem zdjêæ, który posiadaj kreatora konfiguracji i
39 pozwala u¿ytkownikom tworzyæ i zarz±dzaæ albumami przez intuicyjny
40 interfejs WWW. Zarz±dzanie zdjêciami umo¿liwia automatyczne tworzenie
41 miniatur, zmianê wielko¶ci obrazów, obrót, zmianê kolejno¶ci
42 wy¶wietlania, itp. Albumy mog± posiadaæ indywidualne uprawnienia.
43
44 %package setup
45 Summary:        Gallery setup package
46 Summary(pl):    Pakiet do wstêpnej konfiguracji Gallery
47 Group:          Applications/WWW
48 Requires:       %{name} = %{version}-%{release}
49
50 %description setup
51 Install this package to configure initial Gallery installation. You
52 should uninstall this package when you're done, as it considered
53 insecure to keep the setup files in place.
54
55 %description setup -l pl
56 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracGallery Eventum po
57 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
58 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
59
60 %prep
61 %setup -q -n %{name}
62 %patch0 -p1
63
64 tar zxf %{SOURCE1} -C locale
65 rm -f LICENSE.txt *.bat
66 cat > config.conf <<'EOF'
67 Alias /gallery %{_appdir}
68 <Directory %{_appdir}>
69         allow from all
70 </Directory>
71 EOF
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},/var/lib/gallery/albums}
76
77 cp -a *.{php,inc,sh} $RPM_BUILD_ROOT%{_appdir}
78 cp -a classes contrib css docs help html html_wrap images $RPM_BUILD_ROOT%{_appdir}
79 cp -a includes java js layout lib locale platform po skins tools $RPM_BUILD_ROOT%{_appdir}
80 # in /var because of setup/resetadmin file
81 cp -a setup $RPM_BUILD_ROOT/var/lib/gallery
82 ln -s /var/lib/gallery/setup $RPM_BUILD_ROOT%{_appdir}
83 rm -f $RPM_BUILD_ROOT%{_appdir}/{AUTHORS,ChangeLog*,README}
84
85 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
86 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
87 touch $RPM_BUILD_ROOT%{_sysconfdir}/config.php
88 touch $RPM_BUILD_ROOT%{_sysconfdir}/htaccess
89 ln -s %{_sysconfdir}/htaccess $RPM_BUILD_ROOT%{_appdir}/.htaccess
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %triggerin -- apache1
95 %webapp_register apache %{_webapp}
96
97 %triggerun -- apache1
98 %webapp_unregister apache %{_webapp}
99
100 %triggerin -- apache >= 2.0.0
101 %webapp_register httpd %{_webapp}
102
103 %triggerun -- apache >= 2.0.0
104 %webapp_unregister httpd %{_webapp}
105
106 %triggerpostun -- %{name} < 1.5.2-0.13
107 /usr/sbin/webapp register httpd %{_webapp}
108 %service -q httpd reload
109
110 %files
111 %defattr(644,root,root,755)
112 %doc AUTHORS ChangeLog* README
113 %dir %attr(750,root,http) %{_sysconfdir}
114 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
115 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
116 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
117 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/htaccess
118 %dir %{_appdir}
119 %dir /var/lib/gallery
120 %dir %attr(770,root,http) /var/lib/gallery/albums
121 %{_appdir}/.htaccess
122 %{_appdir}/*.php
123 %{_appdir}/*.inc
124 %{_appdir}/classes
125 %{_appdir}/contrib
126 %{_appdir}/css
127 %{_appdir}/docs
128 %{_appdir}/html*
129 %{_appdir}/help
130 %{_appdir}/images
131 %{_appdir}/includes
132 %{_appdir}/java
133 %{_appdir}/js
134 %{_appdir}/layout
135 %{_appdir}/lib
136 %{_appdir}/platform
137 %{_appdir}/po
138 %{_appdir}/skins
139 %{_appdir}/tools
140
141 %dir %{_appdir}/locale
142 %{_appdir}/locale/en_US
143 %lang(pl) %{_appdir}/locale/pl_PL
144
145 %files setup
146 %defattr(644,root,root,755)
147 %attr(755,root,root) %{_appdir}/*.sh
148 %{_appdir}/setup
149 /var/lib/gallery/setup
This page took 0.067357 seconds and 3 git commands to generate.