-%define modname image
-Summary: Drupal Image Module
+%define modname ...
+Summary: Drupal ... Module
Name: drupal-mod-%{modname}
Version: 4.6.0
Release: 0.1
-License: GPL
+License: GPL / GPL v2
Group: Applications/WWW
Source0: http://drupal.org/files/projects/%{modname}-%{version}.tar.gz
# Source0-md5: 0d218124ee86584375d4981ee1646a06
%define _htdocs %{_drupaldir}/htdocs
%define _podir %{_drupaldir}/po/%{modname}
%define _htmlmoddir %{_htdocs}/modules
+%define _htmlmoddir %{_htdocs}/modules/%{modname}
%description
%prep
%setup -q -n %{modname}
-#rm -f LICENSE.txt # pure GPL
+#rm -f LICENSE.txt # GPL
+#rm -f LICENSE.txt # GPL v2
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_moddir},%{_podir},%{_htmlmoddir},%{_incdir},%{_htdocs}}
+install -d $RPM_BUILD_ROOT%{_moddir}
install *.module $RPM_BUILD_ROOT%{_moddir}
install *.inc $RPM_BUILD_ROOT%{_incdir}
EOF
fi
+#%post
+if [ "$1" = 1 ]; then
+%banner -e %{name} <<EOF
+To create ... MySQL database tables, import:
+zcat %{_docdir}/%{name}-%{version}/%{modname}.mysql.gz | mysql drupal
+For Postgresql file is:
+%{_docdir}/%{name}-%{version}/%{modname}.pgsql.gz
+EOF
+fi
+
%files
%defattr(644,root,root,755)
%doc *.txt po/*.pot *.php
+%doc *.txt
+%doc %{modname}.{mysql,pgsql}
+%doc %{modname}.mysql
%{_moddir}/*.module
%{_incdir}/*.inc
%{_podir}