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