]> git.proxmox.com Git - zfsonlinux.git/blame - spl-patches/fix-control.patch
fix upload (remove zfs-dbg package)
[zfsonlinux.git] / spl-patches / fix-control.patch
CommitLineData
e479455e
DM
1Index: new/debian/control.in
2===================================================================
3--- new.orig/debian/control.in
4+++ new/debian/control.in
5@@ -18,32 +18,9 @@ Homepage: http://www.zfsonlinux.org/
6 Vcs-Git: git://anonscm.debian.org/pkg-zfsonlinux/spl.git
7 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-zfsonlinux/spl.git
8
9-Package: spl-dkms
10-Architecture: all
11-Depends: linux-headers-amd64, ${misc:Depends}, dkms (>> 2.1.1.2-5), lsb-release, file
12-Recommends: spl (>= ${source:Upstream-Version})
13-Provides: spl-modules
14-Description: Solaris Porting Layer kernel modules for Linux
15- The Solaris Porting Layer (SPL) is a Linux kernel module which provides
16- many of the Solaris kernel APIs. This shim layer makes it possible to
17- run Solaris kernel code in the Linux kernel with relatively minimal
18- modification. The Solaris Porting LAyer Tests (SPLAT) is a Linux kernel
19- module which provides a testing harness for the SPL module.
20- .
21- SPL can be particularly useful when you want to track upstream Illumos
22- (or any other OpenSolaris fork) development closely and don't want the
23- overhead of maintaining a large patch which converts Solaris primitives
24- to Linux primitives.
25- .
26- This package contains the source code for the SPL and SPLAT Linux kernel
27- modules, which can be used with DKMS, so that local kernel modules are
28- automatically built and installed every time the kernel packages are
29- upgraded.
30-
31 Package: spl
32 Architecture: linux-any
33 Depends: ${shlibs:Depends}, ${misc:Depends}
34-Recommends: spl-modules | spl-dkms
35 Description: Solaris Porting Layer user-space utilities for Linux
36 The Solaris Porting Layer (SPL) is a Linux kernel module which provides
37 many of the Solaris kernel APIs. This shim layer makes it possible to
38Index: new/debian/rules
39===================================================================
40--- new.orig/debian/rules
41+++ new/debian/rules
42@@ -24,15 +24,12 @@ pmodules = $(PACKAGE)-modules-$(non_epoc
43 KIMGVER=$(shell dpkg -s linux-image-$(KVERS)-$(DEB_HOST_ARCH) | grep ^Version | sed 's/.*: //')
44
45 %:
46- dh $@ --with dkms
47+ dh $@
48
49 override_dh_prep-base-deb-files:
50- sed -e 's/##SHLIB_MAJOR##/$(SHLIB_MAJOR)/g ; s/##MODULES_BUILD_DEPENDS##/linux-headers-$(KVERS)-common, linux-headers-$(KVERS)-$(DEB_HOST_ARCH)/g' \
51+ sed -e 's/##SHLIB_MAJOR##/$(SHLIB_MAJOR)/g ; s/##MODULES_BUILD_DEPENDS##/pve-headers-$(KVERS)/g' \
52 < debian/control.in > debian/control
53
54- sed -e 's/##KVERS##/$(KVERS)/g ; s/#KVERS#/$(KVERS)/g ; s/_KVERS_/$(KVERS)/g ; s/##KDREV##/$(KDREV)/g ; s/#KDREV#/$(KDREV)/g ; s/_KDREV_/$(KDREV)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g ; s/_IMGVER_/$(KIMGVER)/g' \
55- < debian/control.modules.in >> debian/control
56-
57 for templ in $(wildcard $(CURDIR)/debian/*_KVERS_*.in); do \
58 sed -e 's/##KVERS##/$(KVERS)/g ; s/#KVERS#/$(KVERS)/g ; s/_KVERS_/$(KVERS)/g ; s/##KDREV##/$(KDREV)/g ; s/#KDREV#/$(KDREV)/g ; s/_KDREV_/$(KDREV)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g' \
59 < $$templ > `echo $$templ | sed -e 's/_KVERS_/$(KVERS)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g ; s/\.in$$//'` ; \
60@@ -52,8 +49,7 @@ override_dh_auto_configure: override_dh_
61 @# Build the userland and the modules
62 dh_auto_configure -- \
63 --prefix=/usr \
64- --with-linux=$(KSRC) \
65- --with-linux-obj=$(KOBJ)
66+ --with-config=user
67
68 override_dh_auto_test:
69 # scripts/check.sh tries insmod and rmmod, so it cannot
70@@ -63,40 +59,6 @@ override_dh_auto_install:
71 @# Install the utilities.
72 $(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
73
74- @# Get a bare copy of the source code.
75- @# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree.
76- $(MAKE) distdir
77-
78- # Install the DKMS source.
79- @# We only want the files needed to build the modules
80- mkdir -p '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'
81- touch '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/.nogitrelease'
82- rm -Rf '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/include'
83- $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(VERSION)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)' || exit 1;)
84- @# Hellish awk line:
85- @# * Deletes from configure.ac the parts not needed for building the kernel module
86- @# * It deletes from inside AC_CONFIG_FILES([]) everything except:
87- @# (Makefile$|include/|module/|*.release$)
88- @# * Takes care of spaces and tabs
89- awk '/^AC_CONFIG_FILES\(\[/,/^\]\)/ { if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/|module\/|Makefile([ \t]+)?$$|spl\.release([ \t]+)?$$))/){next} } {print}' \
90- '$(CURDIR)/$(NAME)-$(VERSION)/configure.ac' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/configure.ac'
91- @# Set "SUBDIRS = module include" for CONFIG_KERNEL and remove SUBDIRS for all other configs.
92- sed '1,/CONFIG_KERNEL/s/SUBDIRS.*=.*//g;s/SUBDIRS.*=.*/SUBDIRS = module include/g;' \
93- '$(CURDIR)/$(NAME)-$(VERSION)/Makefile.am' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/Makefile.am'
94- @# Sanity test
95- grep -q 'SUBDIRS = module include' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/Makefile.am'
96- @# Run autogen on the stripped source tree
97- cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'; ./autogen.sh
98- rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/autom4te.cache'
99-
100- @# This shunt allows DKMS to install the Module.symvers and spl_config.h
101- @# files to the ${dkms_tree} area through the POST_INSTALL directive.
102- echo '#!/bin/sh' >'$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
103- echo 'cp "$$@"' >>'$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
104- chmod 755 '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
105-
106- find '$(CURDIR)/debian/tmp' -name '*~' | xargs rm
107-
108 override_dh_dkms:
109 dh_dkms -V $(VERSION)
110