Makefile 1.02 KB
Newer Older
johan's avatar
johan committed
1 2 3 4 5 6 7
$(eval GIT_DESCRIBE = $(shell sh -c "git describe"))
OUTPUT_DIR = ${CURDIR}
rpm:
	rm -rf $(OUTPUT_DIR)/flexisip-account-manager
	mkdir $(OUTPUT_DIR)/flexisip-account-manager
	mkdir -p $(OUTPUT_DIR)/rpmbuild/SPECS
	mkdir -p $(OUTPUT_DIR)/rpmbuild/SOURCES
johan's avatar
johan committed
8 9 10
	cp -R --parents src/**/*.php $(OUTPUT_DIR)/flexisip-account-manager/
	cp -R --parents src/api/**/*.php $(OUTPUT_DIR)/flexisip-account-manager/
	cp -R --parents conf/*.conf $(OUTPUT_DIR)/flexisip-account-manager/
johan's avatar
johan committed
11
	cp README.md $(OUTPUT_DIR)/flexisip-account-manager/
12
	cp -R httpd/ $(OUTPUT_DIR)/flexisip-account-manager/
johan's avatar
johan committed
13 14 15 16 17 18 19
	cp flexisip-account-manager.spec $(OUTPUT_DIR)/rpmbuild/SPECS/
	tar cvf flexisip-account-manager.tar.gz -C $(OUTPUT_DIR) flexisip-account-manager
	mv flexisip-account-manager.tar.gz $(OUTPUT_DIR)/rpmbuild/SOURCES/flexisip-account-manager.tar.gz
	rpmbuild -v -bb  --define '_topdir $(OUTPUT_DIR)/rpmbuild' --define "_rpmdir $(OUTPUT_DIR)/rpmbuild" $(OUTPUT_DIR)/rpmbuild/SPECS/flexisip-account-manager.spec
	rm -rf $(OUTPUT_DIR)/flexisip-account-manager

.PHONY: rpm