summaryrefslogtreecommitdiff
path: root/packaging/RPMS/Fedora/Makefile
blob: 4824b62926c2411f4e73b63c3a68a0a8e019d26d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Read README.txt for instructions

VERSION=0.0.0
SOURCE_TARBALL_DIR=../../../dist
PACKAGE_VERSION_NAME=rabbitmq-server-$(VERSION)
TARBALL=$(SOURCE_TARBALL_DIR)/$(PACKAGE_VERSION_NAME).tar.gz
TOP_DIR=$(shell pwd)
DEFINES=--define '_topdir $(TOP_DIR)' --define '_tmppath $(TOP_DIR)/tmp'
RPM_SOURCE_DIR=$(PACKAGE_VERSION_NAME)/rpm

rpms:   clean server

#Create proper environment for making rpms
prepare:
	mkdir -p BUILD SOURCES SPECS SRPMS RPMS tmp
	cp $(TOP_DIR)/$(TARBALL) SOURCES
	cp rabbitmq-server.spec SPECS
	sed -i 's/%%VERSION%%/$(VERSION)/' SPECS/rabbitmq-server.spec

	cp init.d SOURCES/rabbitmq-server.init
	cp rabbitmqctl_wrapper SOURCES/rabbitmq-server.wrapper
	cp rabbitmq-server.logrotate SOURCES/rabbitmq-server.logrotate

server: prepare
	rpmbuild -ba SPECS/rabbitmq-server.spec $(DEFINES) --target noarch

clean:	
	rm -rf SOURCES SPECS RPMS SRPMS BUILD tmp