-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (25 loc) · 1.03 KB
/
Makefile
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
PACKAGE = $(shell ls kerub*.war)
VERSION = $(shell echo $(PACKAGE) | sed -e 's/kerub-//g' | sed -e 's/.war//g' | sed -e 's/-SNAPSHOT//g')
clean:
rpmdev-wipetree
rm -f kerub.spec
all: rpms
kerub.spec: kerub.spec.in
echo version will be $(VERSION) build id $(BUILD_ID) - package file is $(package)
cat kerub.spec.in | sed -e 's/BUILD_ID/$(BUILD_ID)/g' | sed -e 's/PACKAGE/$(PACKAGE)/g' | sed -e 's/VERSION/$(VERSION)/g' > kerub.spec
rpms: sources kerub.spec
rpmbuild -ba kerub.spec
rpmdirs:
rpmdev-setuptree
sources: rpmdirs
spectool -g -R kerub.spec
#TODO: this looks like I am doing half of spectool's job
cp ROOT.xml `rpm --eval "%{_sourcedir}"`
cp keystore.jks `rpm --eval "%{_sourcedir}"`
cp shiro.ini `rpm --eval "%{_sourcedir}"`
cp logback.xml `rpm --eval "%{_sourcedir}"`
cp kerub.pp `rpm --eval "%{_sourcedir}"`
cp kerub.properties.local `rpm --eval "%{_sourcedir}"`
cp kerub.properties.cluster `rpm --eval "%{_sourcedir}"`
mkdir -p `rpm --eval "%{_sourcedir}"`/kerub/$(VERSION)
cp $(PACKAGE) `rpm --eval "%{_sourcedir}"`