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