summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile113
-rw-r--r--ipa-admintools/Makefile2
-rw-r--r--ipa-client/Makefile.am3
-rw-r--r--ipa-client/man/Makefile.am6
-rw-r--r--ipa-python/Makefile2
-rw-r--r--ipa-radius-admintools/Makefile2
-rw-r--r--ipa-radius-server/Makefile2
-rw-r--r--ipa-server/Makefile.am3
-rw-r--r--ipa-server/man/Makefile.am6
-rw-r--r--ipa-server/selinux/Makefile1
10 files changed, 78 insertions, 62 deletions
diff --git a/Makefile b/Makefile
index b2fe87c9b..9e6fb356d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,59 +1,52 @@
+include VERSION
+
SUBDIRS=ipa-server ipa-admintools ipa-python ipa-client ipa-radius-server ipa-radius-admintools
PRJ_PREFIX=ipa
RPMBUILD ?= $(PWD)/rpmbuild
-# Version numbers - this is for the entire server. After
-# updating this you should run the version-update
+# After updating the version in VERSION you should run the version-update
# target.
-SERV_MAJOR=1
-SERV_MINOR=0
-SERV_RELEASE=0
-SERV_VERSION=$(SERV_MAJOR).$(SERV_MINOR).$(SERV_RELEASE)
-SERV_TARBALL_PREFIX=$(PRJ_PREFIX)-server-$(SERV_VERSION)
+
+ifeq ($(IPA_VERSION_IS_GIT_SNAPSHOT),"yes")
+GIT_VERSION=$(shell git show --pretty=format:"%h" --stat HEAD 2>/dev/null|head -1)
+ifneq ($(GIT_VERSION),)
+IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE)GIT$(GIT_VERSION)
+endif # in a git tree and git returned a version
+endif # git
+
+ifndef IPA_VERSION
+ifdef IPA_VERSION_PRE_RELEASE
+IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE).pre$(IPA_VERSION_PRE_RELEASE)
+else
+ifdef IPA_VERSION_RC_RELEASE
+IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE).rc$(IPA_VERSION_RC_RELEASE)
+else
+IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE)
+endif # rc
+endif # pre
+endif # ipa_version
+
+SERV_TARBALL_PREFIX=$(PRJ_PREFIX)-server-$(IPA_VERSION)
SERV_TARBALL=$(SERV_TARBALL_PREFIX).tgz
-ADMIN_MAJOR=1
-ADMIN_MINOR=0
-ADMIN_RELEASE=0
-ADMIN_VERSION=$(ADMIN_MAJOR).$(ADMIN_MINOR).$(ADMIN_RELEASE)
-ADMIN_TARBALL_PREFIX=$(PRJ_PREFIX)-admintools-$(ADMIN_VERSION)
+ADMIN_TARBALL_PREFIX=$(PRJ_PREFIX)-admintools-$(IPA_VERSION)
ADMIN_TARBALL=$(ADMIN_TARBALL_PREFIX).tgz
-PYTHON_MAJOR=1
-PYTHON_MINOR=0
-PYTHON_RELEASE=0
-PYTHON_VERSION=$(PYTHON_MAJOR).$(PYTHON_MINOR).$(PYTHON_RELEASE)
-PYTHON_TARBALL_PREFIX=$(PRJ_PREFIX)-python-$(PYTHON_VERSION)
+PYTHON_TARBALL_PREFIX=$(PRJ_PREFIX)-python-$(IPA_VERSION)
PYTHON_TARBALL=$(PYTHON_TARBALL_PREFIX).tgz
-CLI_MAJOR=1
-CLI_MINOR=0
-CLI_RELEASE=0
-CLI_VERSION=$(CLI_MAJOR).$(CLI_MINOR).$(CLI_RELEASE)
-CLI_TARBALL_PREFIX=$(PRJ_PREFIX)-client-$(CLI_VERSION)
+CLI_TARBALL_PREFIX=$(PRJ_PREFIX)-client-$(IPA_VERSION)
CLI_TARBALL=$(CLI_TARBALL_PREFIX).tgz
-RADIUS_SERVER_MAJOR=1
-RADIUS_SERVER_MINOR=0
-RADIUS_SERVER_RELEASE=0
-RADIUS_SERVER_VERSION=$(RADIUS_SERVER_MAJOR).$(RADIUS_SERVER_MINOR).$(RADIUS_SERVER_RELEASE)
-RADIUS_SERVER_TARBALL_PREFIX=$(PRJ_PREFIX)-radius-server-$(RADIUS_SERVER_VERSION)
+RADIUS_SERVER_TARBALL_PREFIX=$(PRJ_PREFIX)-radius-server-$(IPA_VERSION)
RADIUS_SERVER_TARBALL=$(RADIUS_SERVER_TARBALL_PREFIX).tgz
-RADIUS_ADMINTOOLS_MAJOR=1
-RADIUS_ADMINTOOLS_MINOR=0
-RADIUS_ADMINTOOLS_RELEASE=0
-RADIUS_ADMINTOOLS_VERSION=$(RADIUS_ADMINTOOLS_MAJOR).$(RADIUS_ADMINTOOLS_MINOR).$(RADIUS_ADMINTOOLS_RELEASE)
-RADIUS_ADMINTOOLS_TARBALL_PREFIX=$(PRJ_PREFIX)-radius-admintools-$(RADIUS_ADMINTOOLS_VERSION)
+RADIUS_ADMINTOOLS_TARBALL_PREFIX=$(PRJ_PREFIX)-radius-admintools-$(IPA_VERSION)
RADIUS_ADMINTOOLS_TARBALL=$(RADIUS_ADMINTOOLS_TARBALL_PREFIX).tgz
-SERV_SELINUX_MAJOR=1
-SERV_SELINUX_MINOR=0
-SERV_SELINUX_RELEASE=0
-SERV_SELINUX_VERSION=$(SERV_SELINUX_MAJOR).$(SERV_SELINUX_MINOR).$(SERV_SELINUX_RELEASE)
-SERV_SELINUX_TARBALL_PREFIX=$(PRJ_PREFIX)-server-selinux-$(SERV_SELINUX_VERSION)
+SERV_SELINUX_TARBALL_PREFIX=$(PRJ_PREFIX)-server-selinux-$(IPA_VERSION)
SERV_SELINUX_TARBALL=$(SERV_SELINUX_TARBALL_PREFIX).tgz
LIBDIR ?= /usr/lib
@@ -64,10 +57,12 @@ all: bootstrap-autogen
done
bootstrap-autogen:
+ @echo "Building IPA $(IPA_VERSION)"
cd ipa-server; if [ ! -e Makefile ]; then ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi
cd ipa-client; if [ ! -e Makefile ]; then ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi
autogen:
+ @echo "Building IPA $(IPA_VERSION)"
cd ipa-server; ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR)
cd ipa-client; ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR)
@@ -86,26 +81,28 @@ test:
done
version-update:
- sed s/VERSION/$(SERV_VERSION)/ ipa-server/ipa-server.spec.in \
+ sed s/VERSION/$(IPA_VERSION)/ ipa-server/ipa-server.spec.in \
> ipa-server/ipa-server.spec
- sed s/VERSION/$(ADMIN_VERSION)/ ipa-admintools/ipa-admintools.spec.in \
+ sed s/VERSION/$(IPA_VERSION)/ ipa-admintools/ipa-admintools.spec.in \
> ipa-admintools/ipa-admintools.spec
- sed s/VERSION/$(PYTHON_VERSION)/ ipa-python/ipa-python.spec.in \
+ sed s/VERSION/$(IPA_VERSION)/ ipa-python/ipa-python.spec.in \
> ipa-python/ipa-python.spec
- sed s/VERSION/$(CLI_VERSION)/ ipa-client/ipa-client.spec.in \
+ sed s/VERSION/$(IPA_VERSION)/ ipa-client/ipa-client.spec.in \
> ipa-client/ipa-client.spec
- sed s/VERSION/$(RADIUS_SERVER_VERSION)/ ipa-radius-server/ipa-radius-server.spec.in \
+ sed s/VERSION/$(IPA_VERSION)/ ipa-radius-server/ipa-radius-server.spec.in \
> ipa-radius-server/ipa-radius-server.spec
- sed s/VERSION/$(RADIUS_ADMINTOOLS_VERSION)/ ipa-radius-admintools/ipa-radius-admintools.spec.in \
+ sed s/VERSION/$(IPA_VERSION)/ ipa-radius-admintools/ipa-radius-admintools.spec.in \
> ipa-radius-admintools/ipa-radius-admintools.spec
- sed s/VERSION/$(SERV_SELINUX_VERSION)/ ipa-server/selinux/ipa-server-selinux.spec.in \
+ sed s/VERSION/$(IPA_VERSION)/ ipa-server/selinux/ipa-server-selinux.spec.in \
> ipa-server/selinux/ipa-server-selinux.spec
+ sed s/VERSION/$(IPA_VERSION)/ ipa-python/setup.py.in \
+ > ipa-python/setup.py
archive:
@@ -180,44 +177,44 @@ rpmdistdir:
rpm-ipa-server:
cp dist/sources/$(SERV_TARBALL) $(RPMBUILD)/SOURCES/.
rpmbuild --define "_topdir $(RPMBUILD)" -ba ipa-server/ipa-server.spec
- cp rpmbuild/RPMS/*/$(PRJ_PREFIX)-server-$(SERV_VERSION)-*.rpm dist/rpms/
- cp rpmbuild/SRPMS/$(PRJ_PREFIX)-server-$(SERV_VERSION)-*.src.rpm dist/srpms/
+ cp rpmbuild/RPMS/*/$(PRJ_PREFIX)-server-$(IPA_VERSION)-*.rpm dist/rpms/
+ cp rpmbuild/SRPMS/$(PRJ_PREFIX)-server-$(IPA_VERSION)-*.src.rpm dist/srpms/
rpm-ipa-admin:
cp dist/sources/$(ADMIN_TARBALL) $(RPMBUILD)/SOURCES/.
rpmbuild --define "_topdir $(RPMBUILD)" -ba ipa-admintools/ipa-admintools.spec
- cp rpmbuild/RPMS/noarch/$(PRJ_PREFIX)-admintools-$(ADMIN_VERSION)-*.rpm dist/rpms/
- cp rpmbuild/SRPMS/$(PRJ_PREFIX)-admintools-$(ADMIN_VERSION)-*.src.rpm dist/srpms/
+ cp rpmbuild/RPMS/noarch/$(PRJ_PREFIX)-admintools-$(IPA_VERSION)-*.rpm dist/rpms/
+ cp rpmbuild/SRPMS/$(PRJ_PREFIX)-admintools-$(IPA_VERSION)-*.src.rpm dist/srpms/
rpm-ipa-python:
cp dist/sources/$(PYTHON_TARBALL) $(RPMBUILD)/SOURCES/.
rpmbuild --define "_topdir $(RPMBUILD)" -ba ipa-python/ipa-python.spec
- cp rpmbuild/RPMS/noarch/$(PRJ_PREFIX)-python-$(PYTHON_VERSION)-*.rpm dist/rpms/
- cp rpmbuild/SRPMS/$(PRJ_PREFIX)-python-$(PYTHON_VERSION)-*.src.rpm dist/srpms/
+ cp rpmbuild/RPMS/noarch/$(PRJ_PREFIX)-python-$(IPA_VERSION)-*.rpm dist/rpms/
+ cp rpmbuild/SRPMS/$(PRJ_PREFIX)-python-$(IPA_VERSION)-*.src.rpm dist/srpms/
rpm-ipa-client:
cp dist/sources/$(CLI_TARBALL) $(RPMBUILD)/SOURCES/.
rpmbuild --define "_topdir $(RPMBUILD)" -ba ipa-client/ipa-client.spec
- cp rpmbuild/RPMS/*/$(PRJ_PREFIX)-client-$(CLI_VERSION)-*.rpm dist/rpms/
- cp rpmbuild/SRPMS/$(PRJ_PREFIX)-client-$(CLI_VERSION)-*.src.rpm dist/srpms/
+ cp rpmbuild/RPMS/*/$(PRJ_PREFIX)-client-$(IPA_VERSION)-*.rpm dist/rpms/
+ cp rpmbuild/SRPMS/$(PRJ_PREFIX)-client-$(IPA_VERSION)-*.src.rpm dist/srpms/
rpm-ipa-radius-server:
cp dist/sources/$(RADIUS_SERVER_TARBALL) $(RPMBUILD)/SOURCES/.
rpmbuild --define "_topdir $(RPMBUILD)" -ba ipa-radius-server/ipa-radius-server.spec
- cp rpmbuild/RPMS/noarch/$(PRJ_PREFIX)-radius-server-$(RADIUS_SERVER_VERSION)-*.rpm dist/rpms/
- cp rpmbuild/SRPMS/$(PRJ_PREFIX)-radius-server-$(RADIUS_SERVER_VERSION)-*.src.rpm dist/srpms/
+ cp rpmbuild/RPMS/noarch/$(PRJ_PREFIX)-radius-server-$(IPA_VERSION)-*.rpm dist/rpms/
+ cp rpmbuild/SRPMS/$(PRJ_PREFIX)-radius-server-$(IPA_VERSION)-*.src.rpm dist/srpms/
rpm-ipa-radius-admintools:
cp dist/sources/$(RADIUS_ADMINTOOLS_TARBALL) $(RPMBUILD)/SOURCES/.
rpmbuild --define "_topdir $(RPMBUILD)" -ba ipa-radius-admintools/ipa-radius-admintools.spec
- cp rpmbuild/RPMS/noarch/$(PRJ_PREFIX)-radius-admintools-$(RADIUS_ADMINTOOLS_VERSION)-*.rpm dist/rpms/
- cp rpmbuild/SRPMS/$(PRJ_PREFIX)-radius-admintools-$(RADIUS_ADMINTOOLS_VERSION)-*.src.rpm dist/srpms/
+ cp rpmbuild/RPMS/noarch/$(PRJ_PREFIX)-radius-admintools-$(IPA_VERSION)-*.rpm dist/rpms/
+ cp rpmbuild/SRPMS/$(PRJ_PREFIX)-radius-admintools-$(IPA_VERSION)-*.src.rpm dist/srpms/
rpm-ipa-server-selinux:
cp dist/sources/$(SERV_SELINUX_TARBALL) $(RPMBUILD)/SOURCES/.
rpmbuild --define "_topdir $(RPMBUILD)" -ba ipa-server/selinux/ipa-server-selinux.spec
- cp rpmbuild/RPMS/*/$(PRJ_PREFIX)-server-selinux-$(SERV_SELINUX_VERSION)-*.rpm dist/rpms/
- cp rpmbuild/SRPMS/$(PRJ_PREFIX)-server-selinux-$(SERV_SELINUX_VERSION)-*.src.rpm dist/srpms/
+ cp rpmbuild/RPMS/*/$(PRJ_PREFIX)-server-selinux-$(IPA_VERSION)-*.rpm dist/rpms/
+ cp rpmbuild/SRPMS/$(PRJ_PREFIX)-server-selinux-$(IPA_VERSION)-*.src.rpm dist/srpms/
rpms: rpmroot rpmdistdir rpm-ipa-server rpm-ipa-admin rpm-ipa-python rpm-ipa-client rpm-ipa-radius-server rpm-ipa-radius-admintools rpm-ipa-server-selinux
diff --git a/ipa-admintools/Makefile b/ipa-admintools/Makefile
index de1253e2a..77cc38d54 100644
--- a/ipa-admintools/Makefile
+++ b/ipa-admintools/Makefile
@@ -35,7 +35,7 @@ install-man:
install -m 644
clean:
- rm -f *~ *.pyc
+ rm -f *~ *.pyc ipa-admintools.spec
distclean: clean
diff --git a/ipa-client/Makefile.am b/ipa-client/Makefile.am
index 639dbb813..b93e6f35b 100644
--- a/ipa-client/Makefile.am
+++ b/ipa-client/Makefile.am
@@ -62,6 +62,7 @@ MAINTAINERCLEANFILES = \
intltool-*.in \
compile \
configure \
+ COPYING \
INSTALL \
install-sh \
missing \
@@ -73,6 +74,8 @@ MAINTAINERCLEANFILES = \
Makefile.in \
config.h.* \
aclocal.m4 \
+ ipa-client.spec \
+ py-compile \
$(NULL)
# Creating ChangeLog from hg log (taken from cairo/Makefile.am):
diff --git a/ipa-client/man/Makefile.am b/ipa-client/man/Makefile.am
index f2cc876a8..7d0a3aa43 100644
--- a/ipa-client/man/Makefile.am
+++ b/ipa-client/man/Makefile.am
@@ -2,9 +2,15 @@
AUTOMAKE_OPTIONS = 1.7
+NULL =
+
man_MANS = \
ipa-getkeytab.1 \
ipa-client-install.1
install-data-hook:
@for i in $(man_MANS) ; do gzip -f $(DESTDIR)$(man1dir)/$$i ; done
+
+MAINTAINERCLEANFILES = \
+ Makefile.in \
+ $(NULL)
diff --git a/ipa-python/Makefile b/ipa-python/Makefile
index bad5ca5c8..e279286c7 100644
--- a/ipa-python/Makefile
+++ b/ipa-python/Makefile
@@ -13,7 +13,7 @@ install:
fi
clean:
- rm -f *~ *.pyc
+ rm -f *~ *.pyc setup.py ipa-python.spec
distclean: clean
diff --git a/ipa-radius-admintools/Makefile b/ipa-radius-admintools/Makefile
index 15357f011..61aa35f50 100644
--- a/ipa-radius-admintools/Makefile
+++ b/ipa-radius-admintools/Makefile
@@ -14,7 +14,7 @@ install:
install -m 755 ipa-findradiusprofile $(SBINDIR)
clean:
- rm -f *~ *.pyc
+ rm -f *~ *.pyc ipa-radius-admintools.spec
distclean: clean
diff --git a/ipa-radius-server/Makefile b/ipa-radius-server/Makefile
index fa73de97c..795f2f2b2 100644
--- a/ipa-radius-server/Makefile
+++ b/ipa-radius-server/Makefile
@@ -13,7 +13,7 @@ install:
install -m 755 ipa-radius-install $(SBINDIR)
clean:
- rm -fr *.pyc *~
+ rm -fr *.pyc *~ ipa-radius-server.spec
distclean: clean
diff --git a/ipa-server/Makefile.am b/ipa-server/Makefile.am
index 949b39c3e..a0e8bdad9 100644
--- a/ipa-server/Makefile.am
+++ b/ipa-server/Makefile.am
@@ -50,6 +50,7 @@ MAINTAINERCLEANFILES = \
intltool-*.in \
compile \
configure \
+ COPYING \
INSTALL \
install-sh \
missing \
@@ -61,6 +62,8 @@ MAINTAINERCLEANFILES = \
Makefile.in \
config.h.* \
aclocal.m4 \
+ ipa-server.spec \
+ py-compile \
$(NULL)
# Creating ChangeLog from hg log (taken from cairo/Makefile.am):
diff --git a/ipa-server/man/Makefile.am b/ipa-server/man/Makefile.am
index 8ab403094..0398dfdd1 100644
--- a/ipa-server/man/Makefile.am
+++ b/ipa-server/man/Makefile.am
@@ -2,6 +2,8 @@
AUTOMAKE_OPTIONS = 1.7
+NULL=
+
man1_MANS = \
ipa-replica-install.1 \
ipa-replica-manage.1 \
@@ -17,3 +19,7 @@ man8_MANS = \
install-data-hook:
@for i in $(man1_MANS) ; do gzip -f $(DESTDIR)$(man1dir)/$$i ; done
@for i in $(man8_MANS) ; do gzip -f $(DESTDIR)$(man8dir)/$$i ; done
+
+MAINTAINERCLEANFILES = \
+ Makefile.in \
+ $(NULL)
diff --git a/ipa-server/selinux/Makefile b/ipa-server/selinux/Makefile
index 03c3ee309..3d42a4c7f 100644
--- a/ipa-server/selinux/Makefile
+++ b/ipa-server/selinux/Makefile
@@ -13,6 +13,7 @@ clean:
@for subdir in $(SUBDIRS); do \
(cd $$subdir && $(MAKE) -f $(POLICY_MAKEFILE) $@) || exit 1; \
done
+ rm -f ipa-server-selinux.spec
maintainer-clean: clean