mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-08 14:52:31 -04:00
build: add stuff for building an rpm
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
b89b8ebf5d
commit
5ec6b893d3
17
Makefile.am
17
Makefile.am
@ -4,9 +4,24 @@ bin_PROGRAMS = containerfs
|
|||||||
|
|
||||||
ACLOCAL_AMFLAGS = -Im4
|
ACLOCAL_AMFLAGS = -Im4
|
||||||
|
|
||||||
EXTRA_DIST = m4/gnulib-cache.m4
|
EXTRA_DIST = m4/gnulib-cache.m4 rpm/containerfs.spec.template autogen.sh
|
||||||
|
|
||||||
containerfs_CFLAGS = -I . -I lib $(FUSE_CFLAGS)
|
containerfs_CFLAGS = -I . -I lib $(FUSE_CFLAGS)
|
||||||
containerfs_LDFLAGS = $(FUSE_LIBS)
|
containerfs_LDFLAGS = $(FUSE_LIBS)
|
||||||
containerfs_LDADD = lib/libgnu.a
|
containerfs_LDADD = lib/libgnu.a
|
||||||
containerfs_SOURCES = main.c
|
containerfs_SOURCES = main.c
|
||||||
|
|
||||||
|
WD := $(shell pwd)
|
||||||
|
|
||||||
|
containerfs.spec: $(srcdir)/rpm/containerfs.spec.template
|
||||||
|
sed -e 's|#VERSION#|$(VERSION)|g' < $< > $@
|
||||||
|
|
||||||
|
rpm: dist-gzip containerfs.spec
|
||||||
|
echo $(VERSION)
|
||||||
|
$(MAKE) -C $(WD) dist-xz
|
||||||
|
rpmbuild -ba --define "_sourcedir $(WD)" --define "_specdir $(WD)" --define "_builddir $(WD)" --define "_srcrpmdir $(WD)" --define "_rpmdir $(WD)" --define "_buildrootdir $(WD)/.build" containerfs.spec
|
||||||
|
|
||||||
|
srpm: dist-gzip containerfs.spec
|
||||||
|
echo $(VERSION)
|
||||||
|
$(MAKE) -C $(WD) dist-xz
|
||||||
|
rpmbuild -bs --define "_sourcedir $(WD)" --define "_specdir $(WD)" --define "_builddir $(WD)" --define "_srcrpmdir $(WD)" --define "_rpmdir $(WD)" --define "_buildrootdir $(WD)/.build" containerfs.spec
|
||||||
|
2
autogen.sh
Executable file
2
autogen.sh
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec autoreconf -fis
|
36
rpm/containerfs.spec.template
Normal file
36
rpm/containerfs.spec.template
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
Summary: FUSE filesystem for containers.
|
||||||
|
Name: containerfs
|
||||||
|
Version: #VERSION#
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Source0: %{url}/archive/%{name}-%{version}.tar.gz
|
||||||
|
License: GPLv3+
|
||||||
|
URL: https://github.com/giuseppe/containerfs
|
||||||
|
|
||||||
|
# We always run autogen.sh
|
||||||
|
BuildRequires: autoconf automake
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: python
|
||||||
|
BuildRequires: git
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: automake
|
||||||
|
BuildRequires: autoconf
|
||||||
|
BuildRequires: fuse3-devel
|
||||||
|
|
||||||
|
%description
|
||||||
|
containerfs is a FUSE overlayfs implementation.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
env NOCONFIGURE=1 ./autogen.sh
|
||||||
|
%configure --disable-silent-rules
|
||||||
|
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install INSTALL="install -p"
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license COPYING
|
||||||
|
%{_bindir}/%{name}
|
Loading…
x
Reference in New Issue
Block a user