]> Pileus Git - ~andy/fetchmail/commitdiff
Fix installation without Python. Sunil Shetye, reported by Peter Church.
authorMatthias Andree <matthias.andree@gmx.de>
Sat, 19 Nov 2005 12:39:14 +0000 (12:39 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Sat, 19 Nov 2005 12:39:14 +0000 (12:39 -0000)
svn path=/trunk/; revision=4466

Makefile.am
NEWS
configure.ac
specgen.sh

index d765a6169595dd47ad4343bd75d940876f69a781..adb41ad3faecae06ab64d21f61aa41043f960d4f 100644 (file)
@@ -11,10 +11,15 @@ AM_YFLAGS=          -d
 BUILT_SOURCES=         rcfile_y.h
 
 bin_PROGRAMS=          fetchmail
+
+dist_noinst_SCRIPTS=   specgen.sh
+dist_man1_MANS=                fetchmail.man
+
+if HAVE_PYTHON
 nodist_bin_SCRIPTS=    fetchmailconf
 python_PYTHON=         fetchmailconf.py
-dist_noinst_SCRIPTS=   specgen.sh
-dist_man1_MANS=                fetchmail.man fetchmailconf.man
+dist_man1_MANS+=       fetchmailconf.man
+endif
 
 CLEANFILES=            $(nodist_bin_SCRIPTS)
 
@@ -94,8 +99,10 @@ EXTRA_DIST= $(DISTDOCS) fetchmail.spec $(distdirs) ucs/README.svn \
            trio/CHANGES trio/README strlcpy.3 \
            m4-local/ac-archive-license.txt m4-local/ac_ma_search_package.m4
 
+if HAVE_PYTHON
 fetchmailconf:
        ( echo '#! /bin/sh' && echo 'exec @PYTHON@ @pythondir@/fetchmailconf.py "$$@"' ) >$@ || { rm -f $@ ; exit 1; }
+endif
 
 FAQ: fetchmail-FAQ.html
        AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; }
diff --git a/NEWS b/NEWS
index dac1384e531d72aae6fd2195342204ef925d1c67..82b4d41b13c53e0ccf4975ae3f3d5e2ad062ca52 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -300,6 +300,7 @@ fetchmail 6.3.0 (not yet released officially):
   Polish [pl] (Jakub Bogusz), Russian [ru] (Pavel Maryanov).
 * In oversized warning messages, print the account name, too. Fixes Debian
   Bug#213299. Sunil Shetye (MA).
+* Fix installation without Python. Sunil Shetye, reported by Peter Church. (MA)
 
 # INTERNAL CHANGES
 * Switched to automake. Matthias Andree.
index 85dc7b8891c57a5e3534ec52fa8de0091a293562..2c7bb7c2fa5bbba8abd39767915b8112076f2aef 100644 (file)
@@ -18,6 +18,7 @@ AM_INIT_AUTOMAKE(1.5 foreign no-installinfo)
 
 dnl the : states that python is optional
 AM_PATH_PYTHON(2.0,,:)
+AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
 
 AC_PROG_AWK
 AC_PROG_CC
index 0ec09b68c3d5bd7c35f085d0ef6c9a30a1098dfc..47293c4b09c3f8ae6afc360cbb184ba82d32d490 100755 (executable)
@@ -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
 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
 
 %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}