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
fe8e76c2
Commit
fe8e76c2
authored
Jan 31, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce querypackage and build_rpms_name_by_srpm
parent
07189ba6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
7 deletions
+31
-7
rpm
share/eterbuild/functions/rpm
+31
-0
spec
share/eterbuild/functions/spec
+0
-7
No files found.
share/eterbuild/functions/rpm
View file @
fe8e76c2
...
@@ -63,6 +63,37 @@ build_rpms_name()
...
@@ -63,6 +63,37 @@ build_rpms_name()
build_buildroot
build_buildroot
}
}
querypackage
()
{
rpmquery
-p
--queryformat
"%{
$2
}"
$1
}
build_rpms_name_by_srpm
()
{
local
SRPM
=
$1
BASENAME
=
$(
querypackage
$SRPM
NAME
)
RELEASE
=
$(
querypackage
$SRPM
RELEASE
)
VERSION
=
$(
querypackage
$SRPM
VERSION
)
PKGARCH
=
$(
querypackage
$SRPM
ARCH
)
# suggest target arch
if
[
"
$PKGARCH
"
!=
"noarch"
]
;
then
PKGARCH
=
$DEFAULTARCH
fi
NAMERPMIN
=
$BASENAME
-
$VERSION
-
$RELEASE
.
$PKGARCH
.rpm
NAMESRPMIN
=
$BASENAME
-
$VERSION
-
$RELEASE
.src.rpm
if
[
"
$(
basename
"
$SRPM
"
)
"
!=
$NAMESRPMIN
]
;
then
warning
"Generated srpm name
$NAMESRPMIN
is not equal to real file name
$SRPM
"
fi
}
spec_by_srpm
()
{
local
PKG
=
$1
local
PKGNAME
PKGNAME
=
$(
querypackage
$PKG
NAME
)
[
-n
"
$PKGNAME
"
]
&&
echo
$PKGNAME
.spec
}
# pkg-source-1.0.src.rpm -> pkg-source
# pkg-source-1.0.src.rpm -> pkg-source
get_pkgname_from_filename
()
get_pkgname_from_filename
()
{
{
...
...
share/eterbuild/functions/spec
View file @
fe8e76c2
...
@@ -173,13 +173,6 @@ add_changelog_helper()
...
@@ -173,13 +173,6 @@ add_changelog_helper()
return
$R
return
$R
}
}
spec_by_srpm
()
{
local
PKG
=
$1
local
PKGNAME
PKGNAME
=
$(
rpm
-qp
--queryformat
"%{NAME}"
$PKG
)
[
-n
"
$PKGNAME
"
]
&&
echo
$PKGNAME
.spec
}
# set specdir by spec (run with full path to spec only or in spec dir)
# set specdir by spec (run with full path to spec only or in spec dir)
set_specdir
()
set_specdir
()
...
...
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