]>
Commit | Line | Data |
---|---|---|
be6a9dea ER |
1 | %define modname image |
2 | Summary: Drupal Image Module | |
3 | Name: drupal-mod-%{modname} | |
4 | Version: 4.6.0 | |
5 | Release: 0.1 | |
6 | License: GPL | |
7 | Group: Applications/WWW | |
8 | Source0: http://drupal.org/files/projects/%{modname}-%{version}.tar.gz | |
9 | # Source0-md5: 0d218124ee86584375d4981ee1646a06 | |
10 | URL: http://drupal.org/project/image | |
11 | # for %banner | |
12 | #BuildRequires: rpmbuild(macros) >= 1.194 | |
13 | Requires: drupal >= 4.6.0 | |
14 | BuildArch: noarch | |
15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
16 | ||
17 | %define _sysconfdir /etc/drupal | |
18 | %define _drupaldir %{_datadir}/drupal | |
19 | %define _moddir %{_drupaldir}/modules | |
20 | %define _incdir %{_drupaldir}/includes | |
21 | %define _htdocs %{_drupaldir}/htdocs | |
22 | %define _podir %{_drupaldir}/po/%{modname} | |
23 | %define _htmlmoddir %{_htdocs}/modules | |
24 | ||
25 | %description | |
26 | ||
27 | %prep | |
28 | %setup -q -n %{modname} | |
29 | #rm -f LICENSE.txt # pure GPL | |
30 | ||
31 | %install | |
32 | rm -rf $RPM_BUILD_ROOT | |
33 | install -d $RPM_BUILD_ROOT{%{_moddir},%{_podir},%{_htmlmoddir},%{_incdir},%{_htdocs}} | |
34 | ||
35 | install *.module $RPM_BUILD_ROOT%{_moddir} | |
36 | install *.inc $RPM_BUILD_ROOT%{_incdir} | |
37 | install *.css $RPM_BUILD_ROOT%{_htmlmoddir} | |
38 | cp -a po/*.po $RPM_BUILD_ROOT%{_podir} | |
39 | ||
40 | %clean | |
41 | rm -rf $RPM_BUILD_ROOT | |
42 | ||
43 | %post | |
44 | if [ "$1" = 1 ]; then | |
45 | %banner -e %{name} <<EOF | |
46 | If you want to use localization, then you need to upload .po files | |
47 | from %{_podir} via drupal locatization admin. | |
48 | ||
49 | EOF | |
50 | fi | |
51 | ||
52 | %files | |
53 | %defattr(644,root,root,755) | |
54 | %doc *.txt po/*.pot *.php | |
55 | %{_moddir}/*.module | |
56 | %{_incdir}/*.inc | |
57 | %{_podir} | |
58 | %{_htmlmoddir}/*.css |