]>
Commit | Line | Data |
---|---|---|
64e332ab ER |
1 | %define modname spam |
2 | Summary: Drupal Spam Module | |
3 | Name: drupal-mod-%{modname} | |
4 | Version: 2.0.13 | |
5 | Release: 0.1 | |
6 | License: BSD | |
7 | Group: Applications/WWW | |
8 | Source0: http://www.kerneltrap.org/jeremy/drupal/spam/spam-%{version}.tar.bz2 | |
9 | # Source0-md5: e00cc205f912744ba0613d21618d5988 | |
10 | URL: http://www.kerneltrap.org/jeremy/drupal/spam/ | |
11 | BuildRequires: rpmbuild(macros) >= 1.194 | |
12 | Requires: drupal >= 4.6 | |
13 | BuildArch: noarch | |
14 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
15 | ||
16 | %define _sysconfdir /etc/drupal | |
17 | %define _drupaldir %{_datadir}/drupal | |
18 | %define _moddir %{_drupaldir}/modules | |
19 | %define _incdir %{_drupaldir}/includes | |
20 | %define _htdocs %{_drupaldir}/htdocs | |
21 | %define _podir %{_drupaldir}/po/%{modname} | |
22 | %define _htmlmoddir %{_htdocs}/modules | |
23 | %define _htmlmoddir %{_htdocs}/modules/%{modname} | |
24 | ||
25 | %description | |
26 | The spam module is a powerful collection of tools designed to help | |
27 | website administrators to automatically deal with spam. Spam is any | |
28 | content that is posted to a website that is unrelated to the subject | |
29 | at hand, usually in the form of advertising and links back to the | |
30 | spammer's own website. This module can automatically detect spam, | |
31 | instantly unpublish it, and send notification to the site | |
32 | administrator. | |
33 | ||
34 | %prep | |
35 | %setup -q -n %{modname} | |
36 | ||
37 | %install | |
38 | rm -rf $RPM_BUILD_ROOT | |
39 | install -d $RPM_BUILD_ROOT%{_moddir} | |
40 | ||
41 | install *.module $RPM_BUILD_ROOT%{_moddir} | |
42 | ||
43 | %clean | |
44 | rm -rf $RPM_BUILD_ROOT | |
45 | ||
46 | %post | |
47 | if [ "$1" = 1 ]; then | |
48 | %banner -e %{name} <<EOF | |
49 | To create Spam MySQL database tables, import: | |
50 | zcat %{_docdir}/%{name}-%{version}/%{modname}.mysql.gz | mysql drupal | |
51 | For Postgresql file is: | |
52 | %{_docdir}/%{name}-%{version}/%{modname}.pgsql.gz | |
53 | EOF | |
54 | fi | |
55 | ||
56 | %files | |
57 | %defattr(644,root,root,755) | |
58 | %doc *.txt | |
59 | %doc %{modname}.{mysql,pgsql} | |
60 | %{_moddir}/*.module |