mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-22 16:06:27 -05:00
add rpm package building.
This commit is contained in:
parent
0c3d9eaa50
commit
4e624013bb
2 changed files with 46 additions and 1 deletions
10
Makefile
10
Makefile
|
|
@ -34,6 +34,7 @@ STRIP = $(shell which strip)
|
|||
PANDOC = $(shell which pandoc)
|
||||
GIT2DEBCL = ./tools/git2debcl
|
||||
CPPFIND = ./tools/cppfind
|
||||
RPMBUILD = $(shell which rpmbuild)
|
||||
|
||||
ifeq ($(PKGCONFIG),"")
|
||||
$(error "pkg-config not installed")
|
||||
|
|
@ -118,7 +119,7 @@ obj/%.o: src/%.cpp
|
|||
$(CXX) $(CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
$(RM) -rf obj "$(TARGET)" "$(MANPAGE)"
|
||||
$(RM) -rf obj "$(TARGET)" "$(MANPAGE)" rpmbuild
|
||||
$(FIND) -name "*~" -delete
|
||||
|
||||
distclean: clean
|
||||
|
|
@ -154,6 +155,13 @@ deb:
|
|||
$(GIT2DEBCL) $(TARGET) $(VERSION) > debian/changelog
|
||||
$(GIT) buildpackage --git-ignore-new
|
||||
|
||||
rpm:
|
||||
$(eval VERSION := $(subst -,_,$(shell $(GIT) describe --always --tags --dirty)))
|
||||
$(RPMBUILD) -bb $(TARGET).spec \
|
||||
--define "_topdir $(CURDIR)/rpmbuild" \
|
||||
--define "_builddir $(CURDIR)" \
|
||||
--define "pkg_version $(VERSION)"
|
||||
|
||||
.PHONY: all clean install help
|
||||
|
||||
include $(wildcard obj/*.d)
|
||||
|
|
|
|||
37
mergerfs.spec
Normal file
37
mergerfs.spec
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
Name: mergerfs
|
||||
Version: %{pkg_version}
|
||||
Release: 1%{?dist}
|
||||
Summary: A FUSE union filesystem
|
||||
|
||||
Group: Applications/System
|
||||
License: MIT
|
||||
URL: https://github.com/trapexit/mergerfs
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libattr-devel
|
||||
BuildRequires: fuse-devel
|
||||
# rpmbuild driven by the Makefile uses git to generate a version number
|
||||
BuildRequires: git
|
||||
# pandoc pulls in ~60 packages (87M installed) from EPEL :(
|
||||
BuildRequires: pandoc
|
||||
|
||||
Requires: fuse-libs
|
||||
|
||||
%description
|
||||
mergerfs is similar to mhddfs, unionfs, and aufs. Like mhddfs in that it too
|
||||
uses FUSE. Like aufs in that it provides multiple policies for how to handle
|
||||
behavior.
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
||||
%files
|
||||
%{_bindir}/*
|
||||
%doc %{_mandir}/*
|
||||
|
||||
%changelog
|
||||
* Fri Jun 20 2014 Joe Lawrence <joe.lawrence@stratus.com>
|
||||
- Initial rpm spec file.
|
||||
Loading…
Add table
Add a link
Reference in a new issue