forked from projectatomic/container-storage-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (38 loc) · 1.69 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
34
35
36
37
38
39
40
41
42
43
44
DOCKER ?= docker
# Installation directories.
PREFIX ?= $(DESTDIR)/usr
BINDIR ?= $(PREFIX)/bin
MANDIR ?= $(PREFIX)/share/man
UNITDIR ?= $(PREFIX)/lib/systemd/system
CSSLIBDIR ?= $(PREFIX)/share/container-storage-setup
SYSCONFDIR ?= $(DESTDIR)/etc/sysconfig
.PHONY: clean
clean:
-rm -rf *~ \#* .#*
.PHONY: install
install: install-docker install-core
.PHONY: install-docker
install-docker:
install -D -m 644 docker-storage-setup.service ${UNITDIR}/${DOCKER}-storage-setup.service
if [ ! -f ${SYSCONFDIR}/${DOCKER}-storage-setup ]; then \
install -D -m 644 docker-storage-setup-override.conf ${SYSCONFDIR}/${DOCKER}-storage-setup; \
echo "STORAGE_DRIVER=overlay2" >> ${SYSCONFDIR}/${DOCKER}-storage-setup; \
fi
install -d -m 755 ${BINDIR}
(cd ${BINDIR}; ln -sf /usr/bin/container-storage-setup ${DOCKER}-storage-setup)
install -D -m 644 docker-storage-setup.1 ${MANDIR}/man1/${DOCKER}-storage-setup.1
.PHONY: install-core
install-core:
install -D -m 755 container-storage-setup.sh ${BINDIR}/container-storage-setup
install -D -m 644 container-storage-setup.conf ${CSSLIBDIR}/container-storage-setup
install -D -m 755 libcss.sh ${CSSLIBDIR}/libcss.sh
install -D -m 755 css-child-read-write.sh ${CSSLIBDIR}/css-child-read-write
install -D -m 644 container-storage-setup.1 ${MANDIR}/man1/container-storage-setup.1
dist: container-storage-setup.spec
spectool -g container-storage-setup.spec
srpm: dist
rpmbuild --define "_sourcedir `pwd`" --define "_specdir `pwd`" \
--define "_rpmdir `pwd`" --define "_srcrpmdir `pwd`" -bs container-storage-setup.spec
rpm: dist
rpmbuild --define "_sourcedir `pwd`" --define "_specdir `pwd`" \
--define "_rpmdir `pwd`" --define "_srcrpmdir `pwd`" -ba container-storage-setup.spec