diff options
author | Allan McRae <allan@archlinux.org> | 2012-09-24 00:30:46 +1000 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2012-11-27 15:16:15 +1000 |
commit | 7e8d9dfda2e80529b58cb345d359f805149fb68d (patch) | |
tree | 6a6b1f13aae34350230ddda5a577db9f5f44f447 /scripts/makepkg.sh.in | |
parent | a5e81f55993c1be170c73b78b4281845e127a6f3 (diff) | |
download | pacman-7e8d9dfda2e80529b58cb345d359f805149fb68d.tar.xz |
makepkg: create package from stripped debug symbols
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r-- | scripts/makepkg.sh.in | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index cbc6ff2c..ba6119f5 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1864,6 +1864,28 @@ create_package() { fi } +create_debug_package() { + # check if a debug package was requested + if ! check_option "debug" "y" || ! check_option "strip" "y"; then + return + fi + + pkgdir="${pkgdir}-debug" + + # check if we have any debug symbols to package + if dir_is_empty "$pkgdir/usr/lib/debug"; then + return + fi + + depends=("$pkgname=$(get_full_version)") + pkgdesc="Detached debugging symbols for $pkgname" + pkgname=$pkgname-debug + + unset groups optdepends provides conflicts replaces backup install changelog + + create_package +} + create_signature() { if [[ $SIGNPKG != 'y' ]]; then return @@ -2332,6 +2354,7 @@ run_split_packaging() { run_package $pkgname tidy_install create_package + create_debug_package restore_package_variables pkgdir="${pkgdir%/*}" done @@ -2756,6 +2779,7 @@ if (( INFAKEROOT )); then fi tidy_install create_package + create_debug_package pkgdir="${pkgdir%/*}" else run_split_packaging @@ -2895,6 +2919,7 @@ else fi tidy_install create_package + create_debug_package pkgdir="${pkgdir%/*}" else run_split_packaging |