forked from mystilleef/FedoraZram
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (29 loc) · 948 Bytes
/
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
PREFIX ?= /usr
SYSTEMD_UNITDIR ?= $(PREFIX)/lib/systemd/system
SYSCONFDIR ?= /etc/sysconfig
VERSION=1.0.2
SRC_FILES=Makefile README.md zram mkzram.service zram.spec zramstart zramstat zramstop
install:
install -d $(DESTDIR)$(PREFIX)/sbin
install -m 0755 zramstart $(DESTDIR)$(PREFIX)/sbin
install -m 0755 zramstop $(DESTDIR)$(PREFIX)/sbin
install -m 0755 zramstat $(DESTDIR)$(PREFIX)/sbin
install -d $(DESTDIR)$(SYSTEMD_UNITDIR)
install -m 0644 mkzram.service $(DESTDIR)$(SYSTEMD_UNITDIR)
install -d $(DESTDIR)$(SYSCONFDIR)
install -m 0644 zram $(DESTDIR)$(SYSCONFDIR)
.PHONY: clean
clean:
rm -rf zram-$(VERSION) zram-$(VERSION).tar.bz2
.PHONY: tarball
tarball: clean
mkdir zram-$(VERSION)
cp -a $(SRC_FILES) zram-$(VERSION)/
tar -cjvf zram-$(VERSION).tar.bz2 zram-$(VERSION)/
rm -rf zram-$(VERSION)
.PHONY: rpm
rpm: tarball
rpmbuild -tb zram-$(VERSION).tar.bz2
.PHONY: srpm
srpm: tarball
rpmbuild -ts zram-$(VERSION).tar.bz2