Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
45f5dfaf
Commit
45f5dfaf
authored
Aug 12, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmcs: make fixes in right order
parent
e84536eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
16 deletions
+28
-16
rpmcs
bin/rpmcs
+28
-16
No files found.
bin/rpmcs
View file @
45f5dfaf
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
.
`
dirname
$0
`
/../share/eterbuild/functions/common
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod rpm repl spec
load_mod rpm repl spec
set_gear_host
dummy_spec
()
dummy_spec
()
{
{
grep
"^Name"
$1
grep
"^Name"
$1
...
@@ -184,19 +186,15 @@ do
...
@@ -184,19 +186,15 @@ do
# Unused on ALT
# Unused on ALT
subst
"s|^Suggests:|#Suggests:|"
$i
subst
"s|^Suggests:|#Suggests:|"
$i
# Add group
if
!
grep
"^Group"
$i
;
then
PACKAGT
=
"Group: Unknown"
cat
$i
|
awk
'BEGIN{desk=0}{if(/^Url/&&desk==0){printf("%s\n", text);desk++};print}'
text
=
"
$PACKAGT
"
>
$i
.tmp
&&
mv
-f
$i
.tmp
$i
fi
# use in cases
# use in cases
# subst "s|%mdkversion||g" $i
# subst "s|%mdkversion||g" $i
# Add packager
if
!
grep
"^Packager"
$i
;
then
PACKAGT
=
"Packager:
$(
$RPMBUILD
--eval
%packager
$i
)
"
cat
$i
|
awk
'BEGIN{desk=0}{if(/^Source/&&desk==0){printf("%s\n\n", text);desk++};print}'
text
=
"
$PACKAGT
"
>
$i
.tmp
&&
mv
-f
$i
.tmp
$i
fi
# If non alt release, set initial alt release
if
get_release
$i
|
grep
-q
-v
"^alt"
&&
get_release
$i
|
grep
-q
-v
"^
$(
get_default_txtrelease
)
"
;
then
reset_release
$i
fi
# If it was PLD spec
# If it was PLD spec
if
grep
"^%define date"
$i
;
then
if
grep
"^%define date"
$i
;
then
...
@@ -230,12 +228,6 @@ do
...
@@ -230,12 +228,6 @@ do
echog
"fix name and release..."
echog
"fix name and release..."
build_rpms_name
"
$i
"
build_rpms_name
"
$i
"
# For case if name was macros
test
-n
"
$BASENAME
"
&&
set_var
$i
Name
$BASENAME
# For case if version was macros
# set_version is major define safe
test
-n
"
$VERSION
"
&&
set_version
$i
$VERSION
echog
-n
"fix obsoleted constructions..."
echog
-n
"fix obsoleted constructions..."
subst
"s|Source0:|Source:|"
$i
subst
"s|Source0:|Source:|"
$i
...
@@ -453,6 +445,25 @@ do
...
@@ -453,6 +445,25 @@ do
subst
"s|^%defattr(644,root,root,755)||g"
$i
subst
"s|^%defattr(644,root,root,755)||g"
$i
#subst "s|^%attr(.*)\(.*\)$|\1|g" $i
#subst "s|^%attr(.*)\(.*\)$|\1|g" $i
subst
"s|^ *%|%|g"
$i
subst
"s|^ *%|%|g"
$i
# If non alt release, set initial alt release
if
!
rhas
"
$RELEASE
"
"^alt"
&&
!
rhas
"
$RELEASE
"
"^
$(
get_default_txtrelease
)
"
;
then
reset_release
$i
fi
# For case if name was macros
test
-n
"
$BASENAME
"
&&
set_var
$i
Name
$BASENAME
# For case if version was macros
# set_version is major define safe
test
-n
"
$VERSION
"
&&
set_version
$i
$VERSION
# Add packager
if
!
grep
"^Packager"
$i
;
then
PACKAGT
=
"Packager:
$(
$RPMBUILD
--eval
%packager
$i
)
"
cat
$i
|
awk
'BEGIN{desk=0}{if(/^Source/&&desk==0){printf("%s\n\n", text);desk++};print}'
text
=
"
$PACKAGT
"
>
$i
.tmp
&&
mv
-f
$i
.tmp
$i
fi
echog
"DONE"
echog
"DONE"
if
[
-z
"
$SKIPREQS
"
]
;
then
if
[
-z
"
$SKIPREQS
"
]
;
then
...
@@ -461,6 +472,7 @@ do
...
@@ -461,6 +472,7 @@ do
cat
$i
>
$SPEC
cat
$i
>
$SPEC
fi
fi
# Restore changelog
# Restore changelog
cat
$SPEC
.tmpspecchangelog
>>
$SPEC
cat
$SPEC
.tmpspecchangelog
>>
$SPEC
rm
-f
$i
$SPEC
.tmpspecchangelog
rm
-f
$i
$SPEC
.tmpspecchangelog
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment