-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.rpm
34 lines (24 loc) · 1.05 KB
/
Makefile.rpm
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
# Build SDK rpm distribution.
export RPM_SOURCE_ROOT = $(shell echo `pwd`/dist)
export RPM_BUILD_ROOT = $(RPM_SOURCE_ROOT)/BUILD
REV = $(shell grep build_string src/version.c | cut -d ' ' -f 4 | sed 's/;//' | sed 's/"//g' | sed 's/-/_/g' )
.PHONY: default
default: dist
@echo $(REV)
mkdir -p $(RPM_BUILD_ROOT)
mkdir -p $(RPM_SOURCE_ROOT)/RPMS/x86_64
sed 's/@VERSION@/'$(REV)'/g' < aero_libevent2_vspec.tmpl > aero_libevent2_v.spec
sed -i 's/@RELEASE@/'$(OS)'/g' aero_libevent2_v.spec
rpmbuild -bb -vv --buildroot $(RPM_BUILD_ROOT) aero_libevent2_v.spec
distclean:
rm -rf $(RPM_BUILD_ROOT)
.PHONY: dist
dist:
# make RPM directories
mkdir -p $(RPM_BUILD_ROOT)
install -d $(RPM_BUILD_ROOT)/usr/lib
install lib/libev2citrusleaf.a $(RPM_BUILD_ROOT)/usr/lib/libev2citrusleaf.a
install -d $(RPM_BUILD_ROOT)/usr/include/citrusleaf
install include/citrusleaf/*.h $(RPM_BUILD_ROOT)/usr/include/citrusleaf
install -d $(RPM_BUILD_ROOT)/usr/include/citrusleaf_event2
install include/citrusleaf_event2/*.h $(RPM_BUILD_ROOT)/usr/include/citrusleaf_event2