]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - Makefile
add rpm make target and fix up spec file
[bcachefs-tools-debian] / Makefile
index 443322801fbf679aafc82c769b3c4203d7bf8ec0..cd85880ab531dd5a27179289a9d6f344682f2f4c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -82,10 +82,10 @@ LDLIBS+=-lm -lpthread -lrt -lkeyutils -laio -ldl
 LDLIBS+=$(EXTRA_LDLIBS)
 
 ifeq ($(PREFIX),/usr)
-       ROOT_SBINDIR=/sbin
+       ROOT_SBINDIR?=/sbin
        INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools
 else
-       ROOT_SBINDIR=$(PREFIX)/sbin
+       ROOT_SBINDIR?=$(PREFIX)/sbin
        INITRAMFS_DIR=/etc/initramfs-tools
 endif
 
@@ -176,6 +176,10 @@ clean:
 deb: all
        debuild -us -uc -nc -b -i -I
 
+.PHONY: rpm
+rpm: clean
+       rpmbuild --build-in-place -bb --define "_version $(subst -,_,$(VERSION))" packaging/bcachefs-tools.spec
+
 bcachefs-principles-of-operation.pdf: doc/bcachefs-principles-of-operation.tex
        pdflatex doc/bcachefs-principles-of-operation.tex
        pdflatex doc/bcachefs-principles-of-operation.tex