aboutsummaryrefslogtreecommitdiffstats
path: root/specgen.sh
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2005-11-19 12:39:14 +0000
committerMatthias Andree <matthias.andree@gmx.de>2005-11-19 12:39:14 +0000
commitebbff39ac0af7dbf76bab7b8e227559cb2d1edb6 (patch)
treecabea13de4d49ae220e45e5b89dd009fa20b9af8 /specgen.sh
parente9788b54cc8baf3912cfaaa1ba09cee0efe620b8 (diff)
downloadfetchmail-ebbff39ac0af7dbf76bab7b8e227559cb2d1edb6.tar.gz
fetchmail-ebbff39ac0af7dbf76bab7b8e227559cb2d1edb6.tar.bz2
fetchmail-ebbff39ac0af7dbf76bab7b8e227559cb2d1edb6.zip
Fix installation without Python. Sunil Shetye, reported by Peter Church.
svn path=/trunk/; revision=4466
Diffstat (limited to 'specgen.sh')
-rwxr-xr-xspecgen.sh36
1 files changed, 20 insertions, 16 deletions
diff --git a/specgen.sh b/specgen.sh
index 0ec09b68..47293c4b 100755
--- a/specgen.sh
+++ b/specgen.sh
@@ -12,6 +12,8 @@ export LANG LC_TIME
cat <<EOF
# Note: Do not hack fetchmail.spec by hand -- it's generated by specgen.sh
+%define with_python 1
+
Name: fetchmail
Version: $1
Release: 1
@@ -104,6 +106,7 @@ almindelige mail klienter såsom mutt, elm, pine, (x)emacs/gnus,
eller mailx. Der medfølger også et interaktivt GUI-baseret
konfigurations-program, som kan bruges af almindelige brugere.
+%if %{with_python}
%package -n fetchmailconf
Summary: A GUI configurator for generating fetchmail configuration files
Summary(de): GUI-Konfigurator für fetchmail
@@ -136,6 +139,7 @@ Ein interaktiver GUI-Konfigurator für fetchmail in python
%description -n fetchmailconf -l pl
GUI konfigurator do fetchmaila napisany w pythonie.
+%endif
%prep
%setup -q
@@ -143,22 +147,21 @@ GUI konfigurator do fetchmaila napisany w pythonie.
%build
LDFLAGS="-s"
export CFLAGS LDFLAGS
-#./configure --prefix=/usr --disable-nls --without-kerberos --mandir=%{_mandir} --with-SSL --enable-inet6
-./configure --prefix=/usr --without-included-gettext --without-kerberos --mandir=%{_mandir} --with-ssl --enable-inet6
- # Remove --disable-nls, add --without-included-gettext
- # for internationalization. Also look below.
+%configure --without-included-gettext --without-kerberos --with-ssl --enable-inet6
make
%install
-if [ -d \$RPM_BUILD_ROOT ]; then rm -rf \$RPM_BUILD_ROOT; fi
-mkdir -p \$RPM_BUILD_ROOT/{etc/X11/wmconfig,usr/lib/rhs/control-panel}
-make install-strip prefix=\$RPM_BUILD_ROOT/usr mandir=\$RPM_BUILD_ROOT%{_mandir}
+rm -rf \$RPM_BUILD_ROOT
+make install-strip DESTDIR=\$RPM_BUILD_ROOT
+
+%if %{with_python}
+mkdir -p \$RPM_BUILD_ROOT/usr/lib/rhs/control-panel
cp rh-config/*.{xpm,init} \$RPM_BUILD_ROOT/usr/lib/rhs/control-panel
-rm -rf contrib/RCS
-chmod 644 contrib/*
+mkdir -p \$RPM_BUILD_ROOT/etc/X11/wmconfig
cp rh-config/fetchmailconf.wmconfig \$RPM_BUILD_ROOT/etc/X11/wmconfig/fetchmailconf
-#cd \$RPM_BUILD_ROOT%{_mandir}/man1
-#ln -sf fetchmail.1 fetchmailconf.1
+%endif
+
+chmod 644 contrib/*
%clean
rm -rf \$RPM_BUILD_ROOT
@@ -171,18 +174,19 @@ rm -rf \$RPM_BUILD_ROOT
%doc fetchmail-features.html fetchmail-FAQ.html esrs-design-notes.html
%doc design-notes.html
%attr(644, root, man) %{_mandir}/man1/fetchmail.1*
-%attr(755, root, root) /usr/bin/fetchmail
-# Uncomment the following to support internationalization
-%attr(644,root,root) /usr/share/locale/*/LC_MESSAGES/fetchmail.mo
-# Uncomment the following to make split fetchmail and fetchmailconf packages
+%attr(755, root, root) %{_bindir}/fetchmail
+%attr(644,root,root) %{_datadir}/locale/*/LC_MESSAGES/fetchmail.mo
+
+%if %{with_python}
%files -n fetchmailconf
%defattr (644, root, root, 755)
%attr(644,root,root) /etc/X11/wmconfig/fetchmailconf
-%attr(755,root,root) /usr/bin/fetchmailconf
+%attr(755,root,root) %{_bindir}/fetchmailconf
%attr(644, root, man) %{_mandir}/man1/fetchmailconf.1*
%attr(755,root,root) %{_prefix}/lib/python*/site-packages/fetchmailconf.py*
/usr/lib/rhs/control-panel/fetchmailconf.xpm
/usr/lib/rhs/control-panel/fetchmailconf.init
+%endif
%changelog
* `date '+%a %b %d %Y'` <$email> ${version}