]> git.ipfire.org Git - thirdparty/dracut.git/blame - Makefile
renamed archive file and convenience target for rpm
[thirdparty/dracut.git] / Makefile
CommitLineData
7323a621
HH
1VERSION=0.0
2GITVERSION=$(shell git rev-list --abbrev-commit -n 1 HEAD |cut -b 1-8)
3
c4da2407
HH
4modules.d/99base/switch_root: switch_root.c
5 gcc -o modules.d/99base/switch_root switch_root.c
6
7all: modules.d/99base/switch_root
533cd778
JK
8
9install:
10 mkdir -p $(DESTDIR)/usr/libexec/dracut
11 mkdir -p $(DESTDIR)/sbin
6337e3ed 12 mkdir -p $(DESTDIR)/usr/libexec/dracut/modules.d
533cd778 13 install -m 0755 dracut $(DESTDIR)/sbin/dracut
533cd778 14 install -m 0755 dracut-functions $(DESTDIR)/usr/libexec/dracut/functions
f8a22bfb 15 for module in modules.d/*/*; do install -D -m 0755 $$module $(DESTDIR)/usr/libexec/dracut/modules.d ; done
834f6145 16
533cd778
JK
17clean:
18 rm -f *~
834f6145 19 rm -f modules.d/99base/switch_root
533cd778
JK
20
21archive:
7323a621
HH
22 git archive --format=tar HEAD --prefix=dracut-$(VERSION)-$(GITVERSION)/ |bzip2 > dracut-$(VERSION)-$(GITVERSION).tar.bz2
23
24rpm:
25 rpmbuild --define "_sourcedir $$PWD" --define "_specdir $$PWD" --define "_builddir $$PWD" --define "_srcrpmdir $$PWD" --define "_rpmdir $$PWD" -ba dracut.spec