mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Build system and packaging (RPM support)
An update to the build system to properly support all commonly used Makefile targets these include: make all # Build everything make install # Install everything make clean # Clean up build products make distclean # Clean up everything make dist # Create package tarball make srpm # Create package source RPM make rpm # Create package binary RPMs make tags # Create ctags and etags for everything Extra care was taken to ensure that the source RPMs are fully rebuildable against Fedora/RHEL/Chaos kernels. To build binary RPMs from the source RPM for your system simply run: rpmbuild --rebuild spl-x.y.z-1.src.rpm This will produce two binary RPMs with correct 'requires' dependencies for your kernel. One will contain all spl modules and support utilities, the other is a devel package for compiling additional kernel modules which are dependant on the spl. spl-x.y.z-1_<kernel version>.x86_64.rpm spl-devel-x.y.2-1_<kernel version>.x86_64.rpm
This commit is contained in:
+13
-4
@@ -1,10 +1,19 @@
|
||||
subdir-m += spl
|
||||
subdir-m += splat
|
||||
|
||||
all:
|
||||
$(MAKE) -C @LINUX@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules
|
||||
|
||||
install uninstall clean distclean maintainer-clean distdir:
|
||||
modules clean:
|
||||
$(MAKE) -C @LINUX@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
|
||||
|
||||
modules_install:
|
||||
$(MAKE) -C @LINUX@ SUBDIRS=`pwd` INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=addon $@
|
||||
|
||||
distdir:
|
||||
list='$(subdir-m)'; for subdir in $$list; do \
|
||||
(find $$subdir -name '*.c' -o -name '*.h' | \
|
||||
xargs /bin/cp -t $$distdir/$$subdir); \
|
||||
done
|
||||
|
||||
distclean maintainer-clean: clean
|
||||
install: modules_install
|
||||
all: modules
|
||||
check:
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
# Makefile.in for spl kernel module
|
||||
|
||||
MODULES := spl
|
||||
DISTFILES = Makefile.in \
|
||||
spl-kmem.c spl-rwlock.c spl-taskq.c \
|
||||
spl-thread.c spl-generic.c
|
||||
EXTRA_CFLAGS = @KERNELCPPFLAGS@
|
||||
|
||||
# Solaris porting layer module
|
||||
@@ -25,27 +22,3 @@ spl-objs += spl-atomic.o
|
||||
spl-objs += spl-mutex.o
|
||||
spl-objs += spl-kstat.o
|
||||
spl-objs += spl-condvar.o
|
||||
|
||||
splmodule := spl.ko
|
||||
splmoduledir := @kmoduledir@/kernel/lib/
|
||||
|
||||
install:
|
||||
mkdir -p $(DESTDIR)$(splmoduledir)
|
||||
$(INSTALL) -m 644 $(splmodule) $(DESTDIR)$(splmoduledir)/$(splmodule)
|
||||
-/sbin/depmod -a
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(splmoduledir)/$(splmodule)
|
||||
-/sbin/depmod -a
|
||||
|
||||
clean:
|
||||
-rm -f $(splmodule) *.o .*.cmd *.mod.c *.ko *.s */*.o
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile
|
||||
rm -rf .tmp_versions
|
||||
|
||||
maintainer-clean: distclean
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
cp -p $(DISTFILES) $(distdir)
|
||||
|
||||
@@ -118,7 +118,6 @@ spl_kmem_availrmem(void)
|
||||
}
|
||||
EXPORT_SYMBOL(spl_kmem_availrmem);
|
||||
|
||||
#if 0
|
||||
size_t
|
||||
vmem_size(vmem_t *vmp, int typemask)
|
||||
{
|
||||
@@ -138,8 +137,6 @@ vmem_size(vmem_t *vmp, int typemask)
|
||||
return size;
|
||||
}
|
||||
EXPORT_SYMBOL(vmem_size);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Memory allocation interfaces and debugging for basic kmem_*
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Makefile.in for splat kernel module
|
||||
|
||||
MODULES := splat
|
||||
DISTFILES = Makefile.in *.c *.h
|
||||
EXTRA_CFLAGS = @KERNELCPPFLAGS@
|
||||
|
||||
# Solaris Porting LAyer Tests
|
||||
@@ -21,27 +20,3 @@ splat-objs += splat-kobj.o
|
||||
splat-objs += splat-atomic.o
|
||||
splat-objs += splat-list.o
|
||||
splat-objs += splat-generic.o
|
||||
|
||||
splatmodule := splat.ko
|
||||
splatmoduledir := @kmoduledir@/kernel/lib/
|
||||
|
||||
install:
|
||||
mkdir -p $(DESTDIR)$(splatmoduledir)
|
||||
$(INSTALL) -m 644 $(splatmodule) $(DESTDIR)$(splatmoduledir)/$(splatmodule)
|
||||
-/sbin/depmod -a
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(splatmoduledir)/$(splatmodule)
|
||||
-/sbin/depmod -a
|
||||
|
||||
clean:
|
||||
-rm -f $(splmodule) *.o .*.cmd *.mod.c *.ko *.s */*.o
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile
|
||||
rm -rf .tmp_versions
|
||||
|
||||
maintainer-clean: distclean
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
cp -p $(DISTFILES) $(distdir)
|
||||
|
||||
Reference in New Issue
Block a user