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
591f2f7d
Commit
591f2f7d
authored
Dec 13, 2008
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use make_temp_file, some cleanups
parent
5014b151
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
rpm
share/eterbuild/functions/rpm
+10
-11
No files found.
share/eterbuild/functions/rpm
View file @
591f2f7d
...
...
@@ -73,25 +73,24 @@ build_rpms_name()
NAMESPEC
=
$1
shift
test
-f
"
$NAMESPEC
"
||
fatal
"Spec
$NAMESPEC
does not exist"
# Check for broken mktemp
if
mktemp
-V
&>/dev/null
;
then
tmprpm
=
`
mktemp
||
exit
1
`
else
tmprpm
=
`
mktemp
/tmp/
$NAME
.XXXXXX
||
exit
1
`
fi
tmprpm
=
`
make_temp_file
$NAME
`
# Optimization
eval_spec
$NAMESPEC
$@
|
grep
":"
>
$tmprpm
CATSPEC
=
"cat
$tmprpm
"
BASENAME
=
$(
$CATSPEC
| get_var
"Name"
)
RELEASE
=
$(
$CATSPEC
| get_var
"Release"
)
VERSION
=
$(
$CATSPEC
| get_var
"Version"
)
TARBALLNAME
=
$(
$CATSPEC
| get_var
"Source.*"
)
BASENAME
=
$(
cat
$tmprpm
| get_var
"Name"
)
RELEASE
=
$(
cat
$tmprpm
| get_var
"Release"
)
VERSION
=
$(
cat
$tmprpm
| get_var
"Version"
)
TARBALLNAME
=
$(
cat
$tmprpm
| get_var
"Source.*"
)
[
-n
"
$TARBALLNAME
"
]
&&
TARBALLNAME
=
$(
basename
$TARBALLNAME
)
rm
-f
$tmprpm
NAMERPMIN
=
$BASENAME
-
$VERSION
-
$RELEASE
.
$DEFAULTARCH
.rpm
NAMESRPMIN
=
$BASENAME
-
$VERSION
-
$RELEASE
.src.rpm
#RPMSOURCEDIR=$RPMDIR/SOURCES
RPMSOURCEDIR
=
`
rpm
--eval
%_sourcedir | subst_namever
`
[
-n
"
$RPMSOURCEDIR
"
]
||
fatal
"Can't detect RPM/SOURCESd ir"
local
BNS NSS
BNS
=
"
$BASENAME
"
.spec
NSS
=
`
basename
$NAMESPEC
`
...
...
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