Author: mvidner Date: Mon Jun 22 15:49:57 2009 New Revision: 57682 URL: http://svn.opensuse.org/viewcvs/yast?rev=57682&view=rev Log: create-spec: don't override License, Group, %build Modified: trunk/devtools/devtools/bin/create-spec trunk/devtools/package/yast2-devtools.changes Modified: trunk/devtools/devtools/bin/create-spec URL: http://svn.opensuse.org/viewcvs/yast/trunk/devtools/devtools/bin/create-spec?rev=57682&r1=57681&r2=57682&view=diff ============================================================================== --- trunk/devtools/devtools/bin/create-spec (original) +++ trunk/devtools/devtools/bin/create-spec Mon Jun 22 15:49:57 2009 @@ -63,6 +63,33 @@ die "$message"; } +# Some fields used to be part of @MACROS@ but since the demise of PDB +# they need to be correctly filled manually. So take care to only provide them +# if they are not present. +my $DEFAULTLICENSE = "License:\t$LICENSE"; +my $DEFAULTGROUP = "Group:\t\tSystem/YaST"; +my $DEFAULTSUBGROUP = "Group:\t\tDevelopment/Libraries"; +# needed for modifying the build environment variables +my $DEFAULTBUILDTAG = '%build'; +if (! seek(STDIN, 0, 0)) +{ + print STDERR "create-spec: WARNING: Input not seekable, magic disabled.\n"; +} +else +{ + my $subpac = 0; + while (<STDIN>) + { + $subpac = 1 if (/^\@HEADER-DEVEL@/); + + $DEFAULTLICENSE = "" if (/^License:/); + $DEFAULTGROUP = "" if (/^Group:/ && ! $subpac); + $DEFAULTSUBGROUP = "" if (/^Group:/ && $subpac); + $DEFAULTBUILDTAG = "" if (/^\%build/); + } + seek(STDIN, 0, 0); # rewind +} + # Definition of the macros my %macros = ( @@ -79,29 +106,24 @@ # norootforbuild", #", -# The group tag is only a dummy entry. The correct one is inserted by -# prepare_spec. - "\@HEADER\@" => "Name: $RPMNAME Version: $VERSION Release: 0 -License: $LICENSE -Group: System/YaST +$DEFAULTLICENSE +$DEFAULTGROUP BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: $RPMNAME-$VERSION.tar.bz2 prefix: /usr $provides_locale", -# The group tag is only a dummy entry. The correct one is inserted by -# prepare_spec. - "\@HEADER-DEVEL\@" => "\%package devel Requires: $RPMNAME = %version -Group: Development/Libraries", +$DEFAULTSUBGROUP", +# not used in today's packages, maybe useful for maintenance "\@HEADER-INSTSYS\@" => "\%package instsys Group: SuSE internal", @@ -115,7 +137,7 @@ ##### BUILD ##### "\@BUILD\@" => -"\%build +"$DEFAULTBUILDTAG %{prefix}/bin/y2tool y2autoconf %{prefix}/bin/y2tool y2automake autoreconf --force --install @@ -130,7 +152,7 @@ make %{?jobs:-j%jobs} V=1", "\@BUILD-QT\@" => -"\%build +"$DEFAULTBUILDTAG %{prefix}/bin/y2tool y2autoconf %{prefix}/bin/y2tool y2automake autoreconf --force --install @@ -145,7 +167,7 @@ make %{?jobs:-j%jobs} V=1", "\@BUILD-PO\@" => -"\%build +"$DEFAULTBUILDTAG autoreconf --force --install \%{?suse_update_config:\%{suse_update_config -f}} ./configure --libdir=%{_libdir} --prefix=%{prefix} Modified: trunk/devtools/package/yast2-devtools.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/devtools/package/yast2-devtools.changes?rev=57682&r1=57681&r2=57682&view=diff ============================================================================== --- trunk/devtools/package/yast2-devtools.changes (original) +++ trunk/devtools/package/yast2-devtools.changes Mon Jun 22 15:49:57 2009 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Mon Jun 22 15:49:50 CEST 2009 - mvidner@suse.cz + +- create-spec: don't override License, Group, %build + +------------------------------------------------------------------- Fri Jun 19 10:37:43 CEST 2009 - mvidner@suse.cz - autodocs-ycp.ami: fixes to work with subdirectories: -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org