]> git.pld-linux.org Git - packages/gallery.git/blob - gallery.spec
5857789a0e4b361700fc6de32742dc829ab6f293
[packages/gallery.git] / gallery.spec
1 # TODO:
2 # - use external libs, not the included ones: pear, smarty, adodb
3 # - move to separate packages each: theme, module.
4 Summary:        Web based photo album viewer and creator
5 Summary(pl.UTF-8):      Przeglądarka i generator albumów zdjęć w postaci stron WWW
6 Name:           gallery
7 Version:        2.3
8 Release:        2
9 License:        GPL
10 Group:          Applications/Publishing
11 Source0:        http://dl.sourceforge.net/gallery/%{name}-%{version}-full.tar.gz
12 # Source0-md5:  f85663db5f1de99d0b3bc13929f9ab39
13 #Source0:       http://galleryupdates.jpmullan.com/G2/%{name}-nightly.tar.gz
14 Source1:        %{name}-apache.conf
15 Source2:        %{name}-lighttpd.conf
16 Source3:        %{name}-httpd.conf
17 Patch0:         %{name}-setup.patch
18 URL:            http://gallery.sourceforge.net/
19 BuildRequires:  rpmbuild(macros) >= 1.268
20 Requires:       php(gettext)
21 Requires:       php(pcre)
22 Requires:       webapps
23 Requires:       webserver(php) >= 4.1.0
24 #Suggests:      apache(mod_rewrite)
25 #Suggests:      jhead
26 #Suggests:      jpegtran
27 #Suggests:      php-gd
28 Conflicts:      apache-base < 2.4.0-1
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %define         _webapps        /etc/webapps
33 %define         _webapp         %{name}
34 %define         _sysconfdir     %{_webapps}/%{_webapp}
35 %define         _appdir         %{_datadir}/%{_webapp}
36
37 %description
38 Gallery is a photo album that includes a config wizard and lets users
39 create and maintain albums via an intuitive Web interface. Photo
40 management includes automatic thumbnail creation, image resizing,
41 rotation, ordering and more. Albums can have read, write, and caption
42 permissions per individual.
43
44 %description -l pl.UTF-8
45 Gallery jest albumem zdjęć, który posiadaj kreatora konfiguracji i
46 pozwala użytkownikom tworzyć i zarządzać albumami przez intuicyjny
47 interfejs WWW. Zarządzanie zdjęciami umożliwia automatyczne tworzenie
48 miniatur, zmianę wielkości obrazów, obrót, zmianę kolejności
49 wyświetlania, itp. Albumy mogą posiadać indywidualne uprawnienia.
50
51 %package setup
52 Summary:        Gallery setup package
53 Summary(pl.UTF-8):      Pakiet do wstępnej konfiguracji Gallery
54 Group:          Applications/WWW
55 Requires:       %{name} = %{version}-%{release}
56 Conflicts:      external-gallery-module
57
58 %description setup
59 Install this package to configure initial Gallery installation. You
60 should uninstall this package when you're done, as it considered
61 insecure to keep the setup files in place.
62
63 %description setup -l pl.UTF-8
64 Ten pakiet należy zainstalować w celu wstępnej konfiguracji Gallery po
65 pierwszej instalacji. Potem należy go odinstalować, jako że
66 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
67
68 %prep
69 %setup -q -n %{name}2
70 %patch0 -p0
71
72 rm -f LICENSE.txt *.bat
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},/var/lib/gallery/albums}
77
78 cp -a *.{php,inc} $RPM_BUILD_ROOT%{_appdir}
79 cp README.html $RPM_BUILD_ROOT%{_appdir}
80 cp -a images lib modules themes $RPM_BUILD_ROOT%{_appdir}
81 cp -a install upgrade $RPM_BUILD_ROOT%{_appdir}
82
83 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
84 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
85 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
86 touch $RPM_BUILD_ROOT%{_sysconfdir}/config.php
87 touch $RPM_BUILD_ROOT%{_sysconfdir}/login.txt
88 ln -s %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}/config.php
89 ln -s %{_sysconfdir}/login.txt $RPM_BUILD_ROOT%{_appdir}/login.txt
90
91 ## Cleanup modules that are avaible in separate packages:
92 #for module in exif; do
93 #       rm -rf $RPM_BUILD_ROOT%{_appdir}/modules/$module
94 #done
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %triggerin -- apache1 < 1.3.37-3, apache1-base
100 %webapp_register apache %{_webapp}
101
102 %triggerun -- apache1 < 1.3.37-3, apache1-base
103 %webapp_unregister apache %{_webapp}
104
105 %triggerin -- apache-base
106 %webapp_register httpd %{_webapp}
107
108 %triggerun -- apache-base
109 %webapp_unregister httpd %{_webapp}
110
111 %triggerin -- lighttpd
112 %webapp_register lighttpd %{_webapp}
113
114 %triggerun -- lighttpd
115 %webapp_unregister lighttpd %{_webapp}
116
117 %triggerpostun -- %{name} < 1.5.2-0.13
118 /usr/sbin/webapp register httpd %{_webapp}
119 %service -q httpd reload
120
121 %files
122 %defattr(644,root,root,755)
123 %doc README*
124 %dir %attr(750,root,http) %{_sysconfdir}
125 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/login.txt
126 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
127 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
128 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
129 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
130 %dir %{_appdir}
131 %dir /var/lib/gallery
132 %dir %attr(770,root,http) /var/lib/gallery/albums
133 %{_appdir}/login.txt
134 %{_appdir}/*.php
135 %{_appdir}/*.inc
136 %{_appdir}/images
137 %{_appdir}/lib
138 %{_appdir}/modules
139 %{_appdir}/themes
140
141 %files setup
142 %defattr(644,root,root,755)
143 %{_appdir}/README.html
144 %{_appdir}/config.php
145 %{_appdir}/install
146 %{_appdir}/upgrade
This page took 0.089507 seconds and 2 git commands to generate.