TAG="$(git describe --tags --exact-match 2> /dev/null | cut -d- -f 2-)"
if [ -n "${TAG}" ]; then
# We're on a tag
- echo "${TAG}${DIRTY}"
+ echo "${TAG}${DIRTY}" | tee .version
exit 0
fi
echo 'This is not a tag, either tag this commit or do not set $IS_RELEASE' >&2
exit 1
fi
+if [ -z "$TARBALLVERSION" ]; then
+ TARBALLVERSION=$VERSION
+fi
+
if [ -z "$RELEASE" ];then
echo 'Please set $RELEASE' >&2
exit 1
rpmdev-setuptree
# This is somethat ugly...
-if [ -f pdns-${VERSION}.tar.bz2 ]; then
- mv pdns-${VERSION}.tar.bz2 $HOME/rpmbuild/SOURCES
+if [ -f pdns-${TARBALLVERSION}.tar.bz2 ]; then
+ mv pdns-${TARBALLVERSION}.tar.bz2 $HOME/rpmbuild/SOURCES
else
- echo "pdns-${VERSION}.tar.bz2 not found" >&2
+ echo "pdns-${TARBALLVERSION}.tar.bz2 not found" >&2
exit 1
fi
Group: System Environment/Daemons
License: GPLv2
URL: http://powerdns.com
-Source: ../%{name}-%{version}.tar.bz2
+Source: ../%{name}-${TARBALLVERSION}.tar.bz2
Requires(pre): shadow-utils
Requires(post): /sbin/chkconfig
This package contains the SQLite backend for %{name}
%prep
-%setup -q
+%setup -q -n %{name}-${TARBALLVERSION}
%build
export CPPFLAGS="-DLDAP_DEPRECATED"
Group: System Environment/Daemons
License: GPLv2
URL: http://powerdns.com
-Source: ../pdns-%{version}.tar.bz2
+Source: ../pdns-${TARBALLVERSION}.tar.bz2
Requires(pre): shadow-utils
Requires(post): systemd-sysv
This package contains the SQLite backend for %{name}
%prep
-%setup -q
+%setup -q -n %{name}-${TARBALLVERSION}
%build
export CPPFLAGS="-DLDAP_DEPRECATED"
exit 1
fi
+if [ -z "$TARBALLVERSION" ]; then
+ TARBALLVERSION=${VERSION}
+fi
+
if [ -z "$RELEASE" ];then
echo 'Please set $RELEASE' >&2
exit 1
rpmdev-setuptree
# This is somethat ugly...
-if [ -f dnsdist-${VERSION}.tar.bz2 ]; then
- mv dnsdist-${VERSION}.tar.bz2 $HOME/rpmbuild/SOURCES
+if [ -f dnsdist-${TARBALLVERSION}.tar.bz2 ]; then
+ mv dnsdist-${TARBALLVERSION}.tar.bz2 $HOME/rpmbuild/SOURCES
else
- echo "dnsdist-${VERSION}.tar.bz2 not found" >&2
+ echo "dnsdist-${TARBALLVERSION}.tar.bz2 not found" >&2
exit 1
fi
DEFAULTS_FILES=''
# On some older distro's *cough* centos 6 *cough* autosetup fails
-SETUP='%autosetup -n %{name}-%{version}'
+SETUP="%autosetup -n %{name}-${TARBALLVERSION}"
# Some setups need rpmbuild in a 'special' env
RPMBUILD_COMMAND='rpmbuild -bb dnsdist.spec'
INIT_BUILDREQUIRES=''
INIT_INSTALL='install -d -m 755 %{buildroot}/%{_initrddir} && install -m 755 contrib/dnsdist.init.centos6 %{buildroot}/%{_initrddir}/dnsdist'
INIT_FILES='%{_initrddir}/dnsdist'
- SETUP='%setup -n %{name}-%{version}'
+ SETUP="%setup -n %{name}-${TARBALLVERSION}"
RPMBUILD_COMMAND="scl enable devtoolset-2 -- ${RPMBUILD_COMMAND}"
;;
CentOS\ Linux\ *\ 7*)
License: GPLv2
Vendor: PowerDNS.COM BV
Group: System/DNS
-Source: dnsdist-${VERSION}.tar.bz2
+Source: dnsdist-${TARBALLVERSION}.tar.bz2
BuildRequires: readline-devel
BuildRequires: boost-devel
BuildRequires: lua-devel
exit 1
fi
+if [ -z "$TARBALLVERSION" ]; then
+ TARBALLVERSION=${VERSION}
+fi
+
if [ -z "$RELEASE" ];then
echo 'Please set $RELEASE' >&2
exit 1
rpmdev-setuptree
# This is somethat ugly...
-if [ -f pdns-recursor-${VERSION}.tar.bz2 ]; then
- mv pdns-recursor-${VERSION}.tar.bz2 $HOME/rpmbuild/SOURCES
+if [ -f pdns-recursor-${TARBALLVERSION}.tar.bz2 ]; then
+ mv pdns-recursor-${TARBALLVERSION}.tar.bz2 $HOME/rpmbuild/SOURCES
else
- echo "pdns-recursor-${VERSION}.tar.bz2 not found" >&2
+ echo "pdns-recursor-${TARBALLVERSION}.tar.bz2 not found" >&2
exit 1
fi
Group: System Environment/Daemons
License: GPLv2
URL: http://powerdns.com
-Source0: ../%{name}-%{version}.tar.bz2
+Source0: ../%{name}-${TARBALLVERSION}.tar.bz2
Source1: pdns-recursor.init
Provides: powerdns-recursor = %{version}-%{release}
package if you need a dns cache for your network.
%prep
-%setup -q
-sed -i -e 's!SYSCONFDIR=/etc/powerdns!SYSCONFDIR=/etc/pdns-recursor!' -e 's!STRIP_BINARIES?=1!STRIP_BINARIES?=0!' $HOME/rpmbuild/BUILD/pdns-recursor-${VERSION}/Makefile.in
-sed -i -e 's!OS_SPECIFIC_INSTALL=.*!OS_SPECIFIC_INSTALL=!' $HOME/rpmbuild/BUILD/pdns-recursor-${VERSION}/sysdeps/Linux.inc
+%setup -q -n pdns-recursor-${TARBALLVERSION}
+sed -i -e 's!SYSCONFDIR=/etc/powerdns!SYSCONFDIR=/etc/pdns-recursor!' -e 's!STRIP_BINARIES?=1!STRIP_BINARIES?=0!' $HOME/rpmbuild/BUILD/pdns-recursor-${TARBALLVERSION}/Makefile.in
+sed -i -e 's!OS_SPECIFIC_INSTALL=.*!OS_SPECIFIC_INSTALL=!' $HOME/rpmbuild/BUILD/pdns-recursor-${TARBALLVERSION}/sysdeps/Linux.inc
%build
%configure
Group: System Environment/Daemons
License: GPLv2
URL: http://powerdns.com
-Source0: ../%{name}-%{version}.tar.bz2
+Source0: ../%{name}-${TARBALLVERSION}.tar.bz2
Provides: powerdns-recursor = %{version}-%{release}
BuildRequires: boost-devel
package if you need a dns cache for your network.
%prep
-%setup -q
-sed -i -e 's!SYSCONFDIR=/etc/powerdns!SYSCONFDIR=/etc/pdns-recursor!' -e 's!STRIP_BINARIES?=1!STRIP_BINARIES?=0!' $HOME/rpmbuild/BUILD/pdns-recursor-${VERSION}/Makefile.in
-sed -i -e 's!OS_SPECIFIC_INSTALL=.*!OS_SPECIFIC_INSTALL=!' $HOME/rpmbuild/BUILD/pdns-recursor-${VERSION}/sysdeps/Linux.inc
+%setup -q -n pdns-recursor-${TARBALLVERSION}
+sed -i -e 's!SYSCONFDIR=/etc/powerdns!SYSCONFDIR=/etc/pdns-recursor!' -e 's!STRIP_BINARIES?=1!STRIP_BINARIES?=0!' $HOME/rpmbuild/BUILD/pdns-recursor-${TARBALLVERSION}/Makefile.in
+sed -i -e 's!OS_SPECIFIC_INSTALL=.*!OS_SPECIFIC_INSTALL=!' $HOME/rpmbuild/BUILD/pdns-recursor-${TARBALLVERSION}/sysdeps/Linux.inc
%build
%configure