]> Pileus Git - ~andy/fetchmail/blobdiff - specgen.sh
Before showdots,
[~andy/fetchmail] / specgen.sh
index 55869268d96f04e5bd52e9a3dbb9266bdb10ec64..6d72445ed15ab752855552ef0e300010f134e126 100755 (executable)
@@ -1,11 +1,8 @@
 cat <<EOF
-%define name fetchmail
-%define version ${1}
-%define release 1
-%define builddir \$RPM_BUILD_DIR/%{name}-%{version}
-Name:          %{name}
-Version:       %{version}
-Release:       %{release}
+# Note: Do not hack fetchmail.spec by hand -- it's generated by specgen.sh
+Name:          fetchmail
+Version:       $1
+Release:       1
 Vendor:                Eric Conspiracy Secret Labs
 Packager:      Eric S. Raymond <esr@thyrsus.com>
 URL:           http://www.tuxedo.org/~esr/fetchmail
@@ -118,23 +115,23 @@ GUI konfigurator do fetchmaila napisany w pythonie.
 %setup -q
 
 %build
-CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" # Add  --enable-nls --without-included-gettext for internationalization
+CFLAGS="\$RPM_OPT_FLAGS" LDFLAGS="-s"
 export CFLAGS LDFLAGS
-./configure -prefix=/usr
+./configure --prefix=/usr --without-kerberos --mandir=%{_mandir} 
+                         # Add  --enable-nls --without-included-gettext
+                         # for internationalization. Also look below.
 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 prefix=\$RPM_BUILD_ROOT/usr
-cp %{builddir}/rh-config/*.{xpm,init} \$RPM_BUILD_ROOT/usr/lib/rhs/control-panel
-cp %{builddir}/fetchmail.man \$RPM_BUILD_ROOT/usr/man/man1/fetchmail.1
-gzip -9nf \$RPM_BUILD_ROOT/usr/man/man1/fetchmail.1
-cd \$RPM_BUILD_ROOT/usr/man/man1
-ln -sf fetchmail.1.gz fetchmailconf.1.gz
-rm -rf %{builddir}/contrib/RCS
-chmod 644 %{builddir}/contrib/*
-cp %{builddir}/rh-config/fetchmailconf.wmconfig \$RPM_BUILD_ROOT/etc/X11/wmconfig/fetchmailconf
+make install prefix=\$RPM_BUILD_ROOT/usr mandir=\$RPM_BUILD_ROOT%{_mandir}/man1
+cp rh-config/*.{xpm,init} \$RPM_BUILD_ROOT/usr/lib/rhs/control-panel
+rm -rf contrib/RCS
+chmod 644 contrib/*
+cp rh-config/fetchmailconf.wmconfig \$RPM_BUILD_ROOT/etc/X11/wmconfig/fetchmailconf
+cd \$RPM_BUILD_ROOT%{_mandir}/man1
+ln -sf fetchmail.1 fetchmailconf.1
 
 %clean
 rm -rf \$RPM_BUILD_ROOT
@@ -143,18 +140,14 @@ rm -rf \$RPM_BUILD_ROOT
 %defattr (644, root, root, 755)
 %doc README NEWS NOTES FAQ COPYING FEATURES sample.rcfile contrib
 %doc fetchmail-features.html fetchmail-FAQ.html design-notes.html
+%attr(644, root, man) %{_mandir}/man1/*.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
+# %files -n fetchmailconf
+%attr(644,root,root) /etc/X11/wmconfig/fetchmailconf
+%attr(755,root,root) /usr/bin/fetchmailconf
 /usr/lib/rhs/control-panel/fetchmailconf.xpm
 /usr/lib/rhs/control-panel/fetchmailconf.init
-/etc/X11/wmconfig/fetchmailconf
-%defattr (644, root, man)
-/usr/man/man1/*.1.gz
-%defattr (755, root, root)
-/usr/bin/fetchmail
-/usr/bin/fetchmailconf
 EOF
-
-# Add these for internationalization
-#for file in po/*.mo 
-#do
-#    echo "/usr/share/locale/*/LC_MESSAGES/fetchmail.mo"
-#done