diff --git a/ChangeLog b/ChangeLog index fa3f1c2..6b5eeef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,14 @@ Changes in version 1.8.3 Remove 'librarytools' from the list of available templates: it does not exist. ++ update + * spec-create + templates/gnome + templates/kde3, templates/kde4 + templates/library + templates/standard, templates/standard-daemon - Davide Madrisan: + Add the %debug_package macro when required. + -------------------------------------------------------------------------------- Changes in version 1.8.2 diff --git a/plugins/spec-create.in b/plugins/spec-create.in index af1a2cc..f510a80 100644 --- a/plugins/spec-create.in +++ b/plugins/spec-create.in @@ -1,6 +1,6 @@ #!/bin/bash # pck-create -- plugin for @package@ -# Copyright (C) 2004-2011 Davide Madrisan +# Copyright (C) 2004-2012 Davide Madrisan [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] && { echo $"this script requires bash version 3 or better" >&2 && exit 1; } @@ -79,7 +79,7 @@ or FITNESS FOR A PARTICULAR PURPOSE." function version() { echo "\ ${me[0]} ${me[1]} -Copyright (C) 2004-2011 Davide Madrisan " +Copyright (C) 2004-2012 Davide Madrisan " } # $1: optional exit code (default is '1') @@ -234,7 +234,7 @@ source:,standard-docs:,standard-docs-devel:,build-technology:,\ i18n:,icons-mimetypes:,\ infopages:,manpages:,\ pck-devel:,pck-library:,pck-apidocs:,pck-tools:,\ -shared-libraries:,\ +shared-libraries:,debug-package:,\ -n "${0}" -- "$@"` [ $? = 0 ] || exit 1 @@ -262,6 +262,7 @@ shared-libraries:,\ local pck_apidocs="0" local pck_tools="0" local shared_libraries="0" + local debug_package="0" while :; do case $1 in @@ -305,6 +306,8 @@ shared-libraries:,\ pck_tools="$2"; shift ;; --shared-libraries) shared_libraries="$2"; shift ;; + --debug-package) + debug_package="$2"; shift ;; --) shift; break ;; *) notify.error $"unrecognized option"" -- \`$1'" ;; esac @@ -794,6 +797,10 @@ $spec_cmd_configure_autotools --enable-gtk-doc" { pck_library="1"; pck_tools="0"; } esac + # 12. debug package + local debug_package="0" + [ -n "$rpm_macro_debug_package" ] && debug_package="1" + # FIXME: missing support for: # pkgconfig files # includedir files @@ -818,7 +825,8 @@ $spec_cmd_configure_autotools --enable-gtk-doc" --pck-devel "1" \ --pck-library "$pck_library" \ --pck-tools "$pck_tools" \ - --shared-libraries "1" + --shared-libraries "1" \ + --debug-package "1" [ "$outfile" ] && specfile.ckeck_defvalues "$outfile" diff --git a/templates/gnome b/templates/gnome index be09bf4..1b5d869 100644 --- a/templates/gnome +++ b/templates/gnome @@ -22,6 +22,10 @@ License: GPL BuildRequires: gtk-doc BuildRoot: @rpm_default_buildroot@ +@if:debug_package +%debug_package +@fi:debug_package + %description ... diff --git a/templates/kde3 b/templates/kde3 index 2c43279..113a108 100644 --- a/templates/kde3 +++ b/templates/kde3 @@ -15,6 +15,10 @@ License: ... ## AUTOBUILDREQ-END BuildRoot: @rpm_default_buildroot@ +@if:debug_package +%debug_package +@fi:debug_package + %description ... diff --git a/templates/kde4 b/templates/kde4 index 3f5649e..3b8d744 100644 --- a/templates/kde4 +++ b/templates/kde4 @@ -19,6 +19,10 @@ BuildRequires: kdelibs-devel Requires: kde-workspace BuildRoot: @rpm_default_buildroot@ +@if:debug_package +%debug_package +@fi:debug_package + %description ... diff --git a/templates/library b/templates/library index 647049b..d4e2f7b 100644 --- a/templates/library +++ b/templates/library @@ -25,6 +25,10 @@ Requires(post): %{__install_info} @fi:infopages BuildRoot: @rpm_default_buildroot@ +@if:debug_package +%debug_package +@fi:debug_package + %description ... diff --git a/templates/standard b/templates/standard index fb517c8..12bde22 100644 --- a/templates/standard +++ b/templates/standard @@ -18,6 +18,10 @@ Requires(post): %{__install_info} @fi:infopages BuildRoot: @rpm_default_buildroot@ +@if:debug_package +%debug_package +@fi:debug_package + %description ... diff --git a/templates/standard-daemon b/templates/standard-daemon index 39fc53a..638e8f8 100644 --- a/templates/standard-daemon +++ b/templates/standard-daemon @@ -18,6 +18,10 @@ Requires(post): %{__install_info} @fi:infopages BuildRoot: @rpm_default_buildroot@ +@if:debug_package +%debug_package +@fi:debug_package + %description ...