VER=$(shell LC_ALL=C sed -n '/>software_version/s/^.*'\''\([0-9.]*\)'\''.*$$/\1/p' src/common/include/FusionForge.class.php)
in_svn_repo:= $(wildcard .svn/)
-ifeq ($(strip $(in_svn_repo)),)
- ID=unknown
- URL=unknown
- TAG=unknown
-else
+ifneq ($(strip $(in_svn_repo)),)
ID=$(shell LANG=C svnversion|cut -d: -f1)
URL=$(shell LANG=C svn info | grep 'Root:' | awk '{print $$3}')
TAG=$(shell LANG=C svn log $(URL) -r $(ID) -l 1 2>/dev/null | awk '{ if ($$1=="Tag-Release") print $$1}')
+else
+ is_git_repo:= $(wildcard .git/)
+ ifneq ($(strip $(is_git_repo)),)
+ id=$(shell git log --pretty=format:%h | wc -l)
+ hash=$(shell git log -1 --pretty=format:%h)
+ ID=$(id).$(hash)
+ else
+ ID=unknown
+ URL=unknown
+ TAG=unknown
+ endif
endif
ifeq ($(TAG),)
version=$(VER).$(ID)
cd src; find . -type f -or -type l | grep -v '/.svn/' | grep -v '/debian/' | cpio -pdumB --quiet $(RPM_TMP)/SOURCES/fusionforge-$(version)
cd $(RPM_TMP)/SOURCES/fusionforge-$(version)/; utils/manage-translations.sh build ; utils/manage-apache-config.sh build
rm -f $(RPM_TMP)/SOURCES/fusionforge-$(version)/utils/fusionforge-shell-postgresql.spec
- cd $(RPM_TMP)/SOURCES/; cp fusionforge-$(version)/rpm-specific/patches/* .
cd $(RPM_TMP)/SOURCES/; tar cjf fusionforge-$(version).tar.bz2 fusionforge-$(version)
[ -d $(RPM_TMP)/SPECS ] || mkdir $(RPM_TMP)/SPECS
sed -e 's/@@VERSION@@/$(version)/g' < src/fusionforge.spec > $(RPM_TMP)/SPECS/fusionforge.spec
$(RPMBUILD) -bb $(RPM_TMP)/SPECS/fusionforge.spec 2>&1| grep -v '/etc/magic'
+testdepends:
+ @echo "TODO: Makefile.rh $@"
+
3rd-party:
$(MAKE) -C 3rd-party -f Makefile.rh BUILDRESULT=$(BUILDRESULT) all