From 73b43037adc0927dd8360f5abd17d95fd6068892 Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Wed, 31 May 2023 17:01:31 +1000 Subject: [PATCH] specfile updates included --- rename-e-smith-pkg.sh | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/rename-e-smith-pkg.sh b/rename-e-smith-pkg.sh index d2c0ca0..27cdb64 100644 --- a/rename-e-smith-pkg.sh +++ b/rename-e-smith-pkg.sh @@ -200,7 +200,7 @@ cd $GITFiles # Delete the local first if [ -d "$TARGETPKG" ] ; then - if [ $DEBUG ] ; then echo "************Deleting local GIT files" ; fi + if [ $DEBUG ] ; then echo "Deleting local GIT files" ; fi rm -Rf $GITFiles/$TARGETPKG fi @@ -213,31 +213,52 @@ cd $GITFiles/$TARGETPKG #Update README.md # - new name # - Bugzilla link to new name whilst keeping old link for Legacy -sed -i '/^e-smith/a smeserver' README.md +sed -i 's/e-smith/smeserver/g' README.md git add README.md #Update Makefile # - NAME := smeserver- +sed -i 's/e-smith/smeserver/g' Makefile git add Makefile +# spec file #Rename e-smith-.spec as smeserver-.spec mv "$SOURCEPKG.spec" "$TARGETPKG.spec" #Update smeserver-.spec # - change name to smeserver- (%define name) -# - add PROVIDES: e-smith- -# - change all Requires: e-smith* to smeserver* -# - change Source: to new standard of tar.gz -# - delete archivefilename file -# - add changelog entry (Bugzilla #12359) +sed -i "s/^%define name */%define name $TARGETPKG/" "$TARGETPKG.spec" + +# - change all Requires: and BuildRequires: e-smith* to smeserver* +sed -i 's/^Requires:.*e-smith/Requires: smeserver/g' "$TARGETPKG.spec" +sed -i 's/^BuildRequires:.*e-smith/BuildRequires: smeserver/g' "$TARGETPKG.spec" + +# - add changelog entry (Bugzilla #12359) +# Bump the release and add changelog +change-log "$TARGETPKG.spec" +# and edit in the reason and add by whom +sed -i "s/fix \[SME: \]/Rename to smeserver-$TARGETPKG \[SME: 12359\]/" "$TARGETPKG.spec" +sed -i 's/ME MYSELF /rename-e-smith-pkg.sh aka Trevor Batley /' "$TARGETPKG.spec" + +# - add PROVIDES: smeserver- +sed -i "/%description/i Provides: $SOURCEPKG" "$TARGETPKG.spec" + +# - change Source: to new standard of tar.gz +sed -i "s/tar.xz/tar.gz/" "$TARGETPKG.spec" + +# tell git about the changes git rm "$SOURCEPKG.spec" git add "$TARGETPKG.spec" -#Update createlinks -# - if there is an e-smith--update event rename to smeserver--update +#Delete archivefilename file if it follows the new standard +if [ !e archivefilename ] ; then rm archivefilename ; fi -git commit -m "rename-e-smith-pkg" +#Update createlinks +# - if there is an e-smith--update event rename to smeserver--update and add symlink + +git commit -m "rename-e-smith-pkg script (#12359)" +pit push origin master #Convert repository to a Regular Repository (rather than fork)