diff options
author | Brian Behlendorf <[email protected]> | 2012-02-27 10:12:40 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-02-27 14:08:17 -0800 |
commit | 4b787d75c869a7f633607ecb17f3a7c482a553d2 (patch) | |
tree | 39cc219f9493f31fee7203ac6ee8a54fed4d290f /zfs-modules.spec.in | |
parent | 570827e129ed81e066e894530bbe24642f473154 (diff) |
Cleanly support debug packages
Allow a source rpm to be rebuilt with debugging enabled. This
avoids the need to have to manually modify the spec file. By
default debugging is still largely disabled. To enable specific
debugging features use the following options with rpmbuild.
'--with debug' - Enables ASSERTs
# For example:
$ rpmbuild --rebuild --with debug zfs-modules-0.6.0-rc6.src.rpm
Additionally, ZFS_CONFIG has been added to zfs_config.h for
packages which build against these headers. This is critical
to ensure both zfs and the dependant package are using the same
prototype and structure definitions.
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'zfs-modules.spec.in')
-rw-r--r-- | zfs-modules.spec.in | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/zfs-modules.spec.in b/zfs-modules.spec.in index 4c13adf63..f1db8c3a6 100644 --- a/zfs-modules.spec.in +++ b/zfs-modules.spec.in @@ -22,6 +22,17 @@ %define kobj %{require_kobj} %endif +# Set using 'rpmbuild ... --with debug ...', defaults to disabled. +%if %{defined _with_debug} + %define kdebug --enable-debug +%else + %if %{defined _without_debug} + %define kdebug --disable-debug + %else + %define kdebug --disable-debug + %endif +%endif + # SLES: %if %{defined suse_version} %if %{undefined kver} @@ -253,7 +264,7 @@ which use %{name}. %build %configure --with-linux=%{kdir} --with-linux-obj=%{kobj} \ --with-spl=%{spldir} --with-spl-obj=%{splobj} \ - --with-config=kernel + --with-config=kernel %{kdebug} make %install |