mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-12 04:15:06 -05:00
makepkg: allow epoch to be overridden
We can override pkgver and pkgrel so it is only logical to add epoch to that list Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
a7940e7419
commit
03447ce39c
@ -314,7 +314,7 @@ Each split package uses a corresponding packaging function with name
|
|||||||
All options and directives for the split packages default to the global values
|
All options and directives for the split packages default to the global values
|
||||||
given in the PKGBUILD. Nevertheless, the following ones can be overridden within
|
given in the PKGBUILD. Nevertheless, the following ones can be overridden within
|
||||||
each split package's packaging function:
|
each split package's packaging function:
|
||||||
`pkgver`, `pkgrel`, `pkgdesc`, `arch`, `license`, `groups`, `depends`,
|
`pkgver`, `pkgrel`, `epoch`, `pkgdesc`, `arch`, `license`, `groups`, `depends`,
|
||||||
`optdepends`, `provides`, `conflicts`, `replaces`, `backup`, `options`,
|
`optdepends`, `provides`, `conflicts`, `replaces`, `backup`, `options`,
|
||||||
`install` and `changelog`.
|
`install` and `changelog`.
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ package_pkg1() {
|
|||||||
# options and directives that can be overridden
|
# options and directives that can be overridden
|
||||||
pkgver=
|
pkgver=
|
||||||
pkgrel=
|
pkgrel=
|
||||||
|
epoch=
|
||||||
pkgdesc=""
|
pkgdesc=""
|
||||||
arch=()
|
arch=()
|
||||||
license=()
|
license=()
|
||||||
|
@ -44,9 +44,9 @@ startdir="$PWD"
|
|||||||
|
|
||||||
packaging_options=('strip' 'docs' 'libtool' 'emptydirs' 'zipman' 'purge' 'upx')
|
packaging_options=('strip' 'docs' 'libtool' 'emptydirs' 'zipman' 'purge' 'upx')
|
||||||
other_options=('ccache' 'distcc' 'buildflags' 'makeflags')
|
other_options=('ccache' 'distcc' 'buildflags' 'makeflags')
|
||||||
splitpkg_overrides=('pkgver' 'pkgrel' 'pkgdesc' 'arch' 'license' 'groups' \
|
splitpkg_overrides=('pkgver' 'pkgrel' 'epoch' 'pkgdesc' 'arch' 'license' \
|
||||||
'depends' 'optdepends' 'provides' 'conflicts' 'replaces' \
|
'groups' 'depends' 'optdepends' 'provides' 'conflicts' \
|
||||||
'backup' 'options' 'install' 'changelog')
|
'replaces' 'backup' 'options' 'install' 'changelog')
|
||||||
readonly -a packaging_options other_options splitpkg_overrides
|
readonly -a packaging_options other_options splitpkg_overrides
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
@ -1360,10 +1360,13 @@ check_sanity() {
|
|||||||
fi
|
fi
|
||||||
done || ret=1
|
done || ret=1
|
||||||
|
|
||||||
if [[ ! $epoch =~ ^[0-9]*$ ]]; then
|
awk -F'=' '/^[[:space:]]*epoch=/ { $1=""; print $0 }' "$BUILDFILE" |
|
||||||
|
while read i _; do
|
||||||
|
if [[ ! $i =~ ^[0-9]*$ ]]; then
|
||||||
error "$(gettext "%s must be an integer.")" "epoch"
|
error "$(gettext "%s must be an integer.")" "epoch"
|
||||||
ret=1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
done || ret=1
|
||||||
|
|
||||||
if [[ $arch != 'any' ]]; then
|
if [[ $arch != 'any' ]]; then
|
||||||
if ! in_array $CARCH ${arch[@]}; then
|
if ! in_array $CARCH ${arch[@]}; then
|
||||||
|
Loading…
Reference in New Issue
Block a user