aboutsummaryrefslogtreecommitdiffstats
path: root/specgen.sh
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2005-11-21 10:29:21 +0000
committerMatthias Andree <matthias.andree@gmx.de>2005-11-21 10:29:21 +0000
commit413e8125e9f771e634c6c4e12971cd76d421caf9 (patch)
treeb5b07ce2e4ec4a6ca1333948169f186724e3afa7 /specgen.sh
parent02bac831c6497b863f149f41506bbda8e4af978d (diff)
downloadfetchmail-413e8125e9f771e634c6c4e12971cd76d421caf9.tar.gz
fetchmail-413e8125e9f771e634c6c4e12971cd76d421caf9.tar.bz2
fetchmail-413e8125e9f771e634c6c4e12971cd76d421caf9.zip
Major overhaul:
- drop the bogus email address calculation (it didn't work on NIS or LDAP clients anyways), hardcode fetchmail-devel mailing list at lists.berlios.de - add some magic so that RPMs can be built from -rc versions (or other versions that contain a MINUS character) - drop --enable-inet6, no longer needed and no longer supported svn path=/trunk/; revision=4471
Diffstat (limited to 'specgen.sh')
-rwxr-xr-xspecgen.sh34
1 files changed, 24 insertions, 10 deletions
diff --git a/specgen.sh b/specgen.sh
index ea9eff05..fef5e41e 100755
--- a/specgen.sh
+++ b/specgen.sh
@@ -1,10 +1,24 @@
#!/bin/sh
-user=${FM_USER:=`whoami`}
-name=${FM_NAME:=`grep "^${user}:" /etc/passwd | cut -d: -f5|sed -e 's/^.*,//'`}
-domain=${FM_DOMAIN:=mail.berlios.de}
-email="$user@$domain"
-packager="$name <$email>"
+version="$1"
+
+set -e
+
+if [ -z "$version" ] ; then
+ echo >&2 "Usage: $0 <version>"
+ exit 1
+fi
+
+email="fetchmail-devel@lists.berlios.de"
+packager="Fetchmail Developers <$email>"
+rpmver=`echo "$version" | sed 's/-/./g'`
+if test $rpmver = $version ; then
+ vervar="%{version}"
+ setupargs=
+else
+ vervar="${version}"
+ setupargs="-n %{name}-${vervar}"
+fi
LANG=C
LC_TIME=C
@@ -17,12 +31,12 @@ cat <<EOF
%define have_python 1
Name: fetchmail
-Version: $1
+Version: $rpmver
Release: 1
Vendor: The Community Fetchmail Project
Packager: $packager
URL: http://developer.berlios.de/projects/fetchmail
-Source: %{name}-%{version}.tar.bz2
+Source: %{name}-${vervar}.tar.bz2
Group: Applications/Mail
Group(pt_BR): Aplicações/Correio Eletrônico
License: GPL
@@ -144,10 +158,10 @@ GUI konfigurator do fetchmaila napisany w pythonie.
%endif
%prep
-%setup -q
+%setup -q $setupargs
%build
-%configure --without-included-gettext --without-kerberos --with-ssl --enable-inet6
+%configure --without-included-gettext --without-kerberos --with-ssl
make
%install
@@ -189,6 +203,6 @@ rm -rf \$RPM_BUILD_ROOT
%endif
%changelog
-* `date '+%a %b %d %Y'` <$email> ${version}
+* `date '+%a %b %d %Y'` <$email> ${rpmver}
- See the project NEWS file for recent changes.
EOF