diff options
author | Karl MacMillan <kmacmillan@mentalrootkit.com> | 2007-07-27 18:33:31 -0400 |
---|---|---|
committer | Karl MacMillan <kmacmillan@mentalrootkit.com> | 2007-07-27 18:33:31 -0400 |
commit | bac241ffc3e6835d691b357af5582a8b7a6aab06 (patch) | |
tree | 24a6efc26eeb6b4a2f10c3f4e67be72d57bed75e /Makefile | |
parent | f7d005a854a0738b87be181007e3e53ee9985498 (diff) | |
download | freeipa-bac241ffc3e6835d691b357af5582a8b7a6aab06.tar.gz freeipa-bac241ffc3e6835d691b357af5582a8b7a6aab06.tar.xz freeipa-bac241ffc3e6835d691b357af5582a8b7a6aab06.zip |
More reorgnization.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..6b9283cbf --- /dev/null +++ b/Makefile @@ -0,0 +1,68 @@ +SUBDIRS=ipa-server ipa-admintools + +PRJ_PREFIX=freeipa + +# Version numbers - this is for the entire server. After +# updating this you should run the version-update +# target. +SERV_MAJOR=0 +SERV_MINOR=1 +SERV_RELEASE=0 +SERV_VERSION=$(SERV_MAJOR).$(SERV_MINOR).$(SERV_RELEASE) + +SERV_TARBALL_PREFIX=$(PRJ_PREFIX)-server-$(SERV_VERSION) +SERV_TARBALL=$(SERV_TARBALL_PREFIX).tgz + +ADMIN_MAJOR=0 +ADMIN_MINOR=1 +ADMIN_RELEASE=0 +ADMIN_VERSION=$(ADMIN_MAJOR).$(ADMIN_MINOR).$(ADMIN_RELEASE) + +ADMIN_TARBALL_PREFIX=$(PRJ_PREFIX)-admintools-$(ADMIN_VERSION) +ADMIN_TARBALL=$(ADMIN_TARBALL_PREFIX).tgz + +all: + @for subdir in $(SUBDIRS); do \ + (cd $$subdir && $(MAKE) $@) || exit 1; \ + done + +install: + @for subdir in $(SUBDIRS); do \ + (cd $$subdir && $(MAKE) $@) || exit 1; \ + done + +clean: + @for subdir in $(SUBDIRS); do \ + (cd $$subdir && $(MAKE) $@) || exit 1; \ + done + +version-update: + sed s/VERSION/$(SERV_VERSION)/ ipa-server/freeipa-server.spec.in \ + > ipa-server/freeipa-server.spec +tarballs: + -mkdir -p dist + hg archive -t files dist/freeipa + + # ipa-server + mv dist/freeipa/ipa-server dist/$(SERV_TARBALL_PREFIX) + rm -f dist/$(SERV_TARBALL) + cd dist; tar cfz $(SERV_TARBALL) $(SERV_TARBALL_PREFIX) + rm -fr dist/$(SERV_TARBALL_PREFIX) + + # ipa-admintools + mv dist/freeipa/ipa-admintools dist/$(ADMIN_TARBALL_PREFIX) + rm -f dist/$(ADMIN_TARBALL) + cd dist; tar cfz $(ADMIN_TARBALL) $(ADMIN_TARBALL_PREFIX) + rm -fr dist/$(ADMIN_TARBALL_PREFIX) + + # cleanup + rm -fr dist/freeipa + +dist: version-update tarballs + cp dist/$(SERV_TARBALL) ~/rpmbuild/SOURCES/. + rpmbuild -ba ipa-server/freeipa-server.spec + cp ~/rpmbuild/RPMS/noarch/$(PRJ_PREFIX)-server-$(SERV_VERSION)-*.rpm dist/. + cp ~/rpmbuild/SRPMS/$(PRJ_PREFIX)-server-$(SERV_VERSION)-*.src.rpm dist/. + +dist-clean: clean + rm -fr dist |