summaryrefslogtreecommitdiffstats
path: root/freeipa.spec.in
diff options
context:
space:
mode:
authorPetr Spacek <pspacek@redhat.com>2016-10-21 22:35:28 +0200
committerMartin Babinsky <mbabinsk@redhat.com>2016-11-09 13:08:32 +0100
commitc48e5fd811326dc64e19490f88003e442815a052 (patch)
treee63d94b25d76b643dc05d6e2da2e9daef7438b40 /freeipa.spec.in
parent2725e440bf1e4930f9b1d19223424bcb0d4b7066 (diff)
downloadfreeipa-c48e5fd811326dc64e19490f88003e442815a052.tar.gz
freeipa-c48e5fd811326dc64e19490f88003e442815a052.tar.xz
freeipa-c48e5fd811326dc64e19490f88003e442815a052.zip
Build: move version handling from Makefile to configure
Version information is now in VERSION.m4 instead of VERSION. Makefile target version-update was minimized and configure can be run before make. Makefile temporarily contains hardcoded version which has to match the one specified in VERSION.m4. This is preparatory step which will allow us to replace hand-made Makefile with one generated by Automake. https://fedorahosted.org/freeipa/ticket/6418 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
Diffstat (limited to 'freeipa.spec.in')
-rw-r--r--freeipa.spec.in18
1 files changed, 12 insertions, 6 deletions
diff --git a/freeipa.spec.in b/freeipa.spec.in
index fbe7ff99c..9e30a3927 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -30,9 +30,18 @@
%define _hardened_build 1
+# Work-around fact that RPM SPEC parser does not accept
+# "Version: @VERSION@" in freeipa.spec.in used for Autoconf string replacement
+%define IPA_VERSION @VERSION@
+%define AT_SIGN @
+# redefine IPA_VERSION only if its value matches the Autoconf placeholder
+%if "%{IPA_VERSION}" == "%{AT_SIGN}VERSION%{AT_SIGN}"
+ %define IPA_VERSION nonsense.to.please.RPM.SPEC.parser
+%endif
+
Name: freeipa
-Version: __VERSION__
-Release: __RELEASE__%{?dist}
+Version: %{IPA_VERSION}
+Release: upstream
Summary: The Identity, Policy and Audit system
Group: System Environment/Base
@@ -680,8 +689,6 @@ export JAVA_STACK_SIZE="8m"
export CFLAGS="%{optflags} $CFLAGS"
export LDFLAGS="%{__global_ldflags} $LDFLAGS"
-export IPA_VENDOR_VERSION_SUFFIX=-%{release}
-
%if ! %{ONLY_CLIENT}
make IPA_VERSION_IS_GIT_SNAPSHOT=no LIBDIR=%{_libdir} %{?_smp_mflags} all
%else
@@ -699,7 +706,6 @@ make %{?_smp_mflags} client-check VERBOSE=yes LIBDIR=%{_libdir}
%install
rm -rf %{buildroot}
-export IPA_VENDOR_VERSION_SUFFIX=-%{release}
make version-update LIBDIR=%{_libdir}
%if ! %{ONLY_CLIENT}
make install DESTDIR=%{buildroot} LIBDIR=%{_libdir}
@@ -1438,6 +1444,6 @@ fi
%changelog
-* Tue Nov 26 2013 Petr Viktorin<pviktori@redhat.com> - __VERSION__-__RELEASE__
+* Tue Nov 26 2013 Petr Viktorin <pviktori@redhat.com> - @VERSION@-@VENDOR_SUFFIX@
- Remove changelog. The history is kept in Git, downstreams have own logs.
# note, this entry is here to placate tools that expect a non-empty changelog