diff options
author | Brian Behlendorf <[email protected]> | 2012-08-13 15:47:18 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-08-13 16:35:26 -0700 |
commit | 9ca431763e2db4c05858ed7dc578a8d6dbcc54d6 (patch) | |
tree | 6510f759eba79241a80ba43f2c6e493f964d309b /zfs-modules.spec.in | |
parent | bafc4e9e2ac3b4783a598afb1d2f048ab30c903c (diff) |
Cleanly remove zfs-modules-devel headers
Add the /usr/src/zfs-<version>-<release>/<kernel> directory to
the zfs-modules-devel package. This ensures that this directory
will be removed when the package is removed.
We do not include the higher level /usr/src/zfs-<version>-<release>
directory since there may be builds for multiple kernels. Instead,
a %postun rmdir is added which attempts to remove this directory.
It will only succeed when the last zfs-modules-devel-* package
for this specific release is removed.
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'zfs-modules.spec.in')
-rw-r--r-- | zfs-modules.spec.in | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/zfs-modules.spec.in b/zfs-modules.spec.in index 057da20be..4ac965998 100644 --- a/zfs-modules.spec.in +++ b/zfs-modules.spec.in @@ -579,7 +579,7 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root) -%{_prefix}/src/*/%{kver_kern}/* +%{_prefix}/src/*/%{kver_kern} %post if [ -f /boot/System.map-%{kver_kern} ]; then @@ -595,6 +595,10 @@ else /sbin/depmod -a || exit 0 fi +%postun devel +rmdir %{_prefix}/src/@PACKAGE@-%{version}-@ZFS_META_RELEASE@ 2>/dev/null +exit 0 + %endif %if %{?with_kernel_debug} @@ -604,7 +608,7 @@ fi %files debug-devel %defattr(-,root,root) -%{_prefix}/src/*/%{kver_dbug}/* +%{_prefix}/src/*/%{kver_dbug} %post debug if [ -f /boot/System.map-%{kver_dbug} ]; then @@ -620,12 +624,16 @@ else /sbin/depmod -a || exit 0 fi +%postun debug-devel +rmdir %{_prefix}/src/@PACKAGE@-%{version}-@ZFS_META_RELEASE@ 2>/dev/null +exit 0 + %endif %if %{?with_kernel_dkms} %files dkms %defattr(-,root,root) -%{_prefix}/src/@PACKAGE@-%{version}/* +%{_prefix}/src/@PACKAGE@-%{version} %post dkms for POSTINST in %{_prefix}/lib/dkms/common.postinst; do |