summaryrefslogtreecommitdiff
path: root/packaging/windows/Makefile
blob: f47b534083d1d6820aa3ccc022007fa0697701c8 (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
29
30
31
32
33
34
35
36
37
VERSION=0.0.0
SOURCE_DIR=rabbitmq-server-$(VERSION)
TARGET_DIR=rabbitmq_server-$(VERSION)
TARGET_ZIP=rabbitmq-server-windows-$(VERSION)

dist:
	$(MAKE) -C ../.. VERSION=$(VERSION) srcdist
	tar -zxvf ../../dist/$(SOURCE_DIR).tar.gz
	$(MAKE) -C $(SOURCE_DIR)

	mkdir $(SOURCE_DIR)/sbin
	mv $(SOURCE_DIR)/scripts/rabbitmq-server.bat $(SOURCE_DIR)/sbin
	mv $(SOURCE_DIR)/scripts/rabbitmq-service.bat $(SOURCE_DIR)/sbin
	mv $(SOURCE_DIR)/scripts/rabbitmqctl.bat $(SOURCE_DIR)/sbin
	mv $(SOURCE_DIR)/scripts/rabbitmq-multi.bat $(SOURCE_DIR)/sbin
	rm -rf $(SOURCE_DIR)/scripts
	rm -rf $(SOURCE_DIR)/codegen* $(SOURCE_DIR)/Makefile
	rm -f $(SOURCE_DIR)/README
	rm -rf $(SOURCE_DIR)/docs

	mv $(SOURCE_DIR) $(TARGET_DIR)
	mkdir -p $(TARGET_DIR)
	mkdir -p $(TARGET_DIR)/plugins
	echo Put your .ez plugin files in this directory > $(TARGET_DIR)/plugins/README
	xmlto -o . xhtml-nochunks ../../docs/rabbitmq-service.xml
	elinks -dump -no-references -no-numbering rabbitmq-service.html \
		> $(TARGET_DIR)/readme-service.txt
	todos $(TARGET_DIR)/readme-service.txt
	zip -r $(TARGET_ZIP).zip $(TARGET_DIR)
	rm -rf $(TARGET_DIR) rabbitmq-service.html

clean: clean_partial
	rm -f rabbitmq-server-windows-*.zip

clean_partial:
	rm -rf $(SOURCE_DIR)
	rm -rf $(TARGET_DIR)