forked from Mirror/pmbootstrap
* postmarketos-splash: change arch from "all" to "noarch" * lg-mako: use .tar.gz instead of .zip (because that's the reference APKBUILD) * #220: Allow specifying multiple packages for checksum, build, aportgen * #239: Add chroot shortcuts (--rootfs and --buildroot) * Show chroot and command before entering chroot
This commit is contained in:
parent
81d8acd536
commit
2cabe1d51a
4 changed files with 48 additions and 18 deletions
|
@ -20,7 +20,7 @@ case $pkgver in
|
||||||
*.*.*) _kernver=${pkgver%.*};;
|
*.*.*) _kernver=${pkgver%.*};;
|
||||||
*.*) _kernver=$pkgver;;
|
*.*) _kernver=$pkgver;;
|
||||||
esac
|
esac
|
||||||
pkgrel=3
|
pkgrel=4
|
||||||
arch="armhf"
|
arch="armhf"
|
||||||
pkgdesc="Nexus 4 kernel from LineageOS"
|
pkgdesc="Nexus 4 kernel from LineageOS"
|
||||||
url="https://github.com/LineageOS/lge-kernel-mako"
|
url="https://github.com/LineageOS/lge-kernel-mako"
|
||||||
|
@ -29,7 +29,7 @@ makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev"
|
||||||
options="!strip !check !tracedeps"
|
options="!strip !check !tracedeps"
|
||||||
install=
|
install=
|
||||||
source="
|
source="
|
||||||
$pkgname-$_hash.zip::https://github.com/LineageOS/${_vendor}-kernel-mako/archive/${_hash}.zip
|
$pkgname-$_hash.tar.gz::https://github.com/LineageOS/${_vendor}-kernel-mako/archive/${_hash}.tar.gz
|
||||||
$_config
|
$_config
|
||||||
compiler-gcc6.h
|
compiler-gcc6.h
|
||||||
gpu-msm-fix-gcc5-compile.patch
|
gpu-msm-fix-gcc5-compile.patch
|
||||||
|
@ -101,7 +101,7 @@ package() {
|
||||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="5a1636374ea0d2b219de5b501035e8b03935c9cf31a5c1aaa831805318d9ff780b0e13f11c73343c63c74a026c4846215ec7954a1b23740bb690b9723d5d9e11 linux-lg-mako-1495bfcf93f9e0e896331f29e1850387c31d6714.zip
|
sha512sums="744b7eb2f0abc60492a0e01c75814d9086fd572b909bffb6ee5f7ffaf7e9f335b13df33eb467bd9b1b192f57eb258737db52072d575130ce476552dbd1a707ff linux-lg-mako-1495bfcf93f9e0e896331f29e1850387c31d6714.tar.gz
|
||||||
091f0a6d604653098e3d06a834fa3d4a9c34cbdb4b742c949950bada118e58cc858dce817e763023fe7ac5dd7ae17930ef7a3de765e5b7d84b1971572dbf37a1 config-lg-mako.armhf
|
091f0a6d604653098e3d06a834fa3d4a9c34cbdb4b742c949950bada118e58cc858dce817e763023fe7ac5dd7ae17930ef7a3de765e5b7d84b1971572dbf37a1 config-lg-mako.armhf
|
||||||
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
||||||
7be03a9e78b7ac330a54b1f00509caa0621a95c0c55901878ad757f9dd69cc05ba2c8b5ea987063ae1224f92c4d090d515fa5d369e7755181a4871b0d0f82881 gpu-msm-fix-gcc5-compile.patch"
|
7be03a9e78b7ac330a54b1f00509caa0621a95c0c55901878ad757f9dd69cc05ba2c8b5ea987063ae1224f92c4d090d515fa5d369e7755181a4871b0d0f82881 gpu-msm-fix-gcc5-compile.patch"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
pkgname=postmarketos-splash
|
pkgname=postmarketos-splash
|
||||||
pkgver=1
|
pkgver=1
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc="Splash screen for postmarketOS"
|
pkgdesc="Splash screen for postmarketOS"
|
||||||
url="https://github.com/postmarketos"
|
url="https://github.com/postmarketos"
|
||||||
arch="all"
|
arch="noarch"
|
||||||
license="mit"
|
license="mit"
|
||||||
depends="ttf-dejavu ttf-droid py3-pillow"
|
depends="ttf-dejavu ttf-droid py3-pillow"
|
||||||
makedepends=""
|
makedepends=""
|
||||||
|
|
|
@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License
|
||||||
along with pmbootstrap. If not, see <http://www.gnu.org/licenses/>.
|
along with pmbootstrap. If not, see <http://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import logging
|
||||||
import json
|
import json
|
||||||
import pmb.aportgen
|
import pmb.aportgen
|
||||||
import pmb.build
|
import pmb.build
|
||||||
|
@ -35,17 +36,31 @@ import pmb.install
|
||||||
import pmb.parse
|
import pmb.parse
|
||||||
|
|
||||||
|
|
||||||
|
def _parse_suffix(args):
|
||||||
|
if args.rootfs:
|
||||||
|
return "rootfs_" + args.device
|
||||||
|
elif args.buildroot:
|
||||||
|
return "buildroot_" + args.deviceinfo["arch"]
|
||||||
|
elif args.suffix:
|
||||||
|
return args.suffix
|
||||||
|
else:
|
||||||
|
return "native"
|
||||||
|
|
||||||
|
|
||||||
def aportgen(args):
|
def aportgen(args):
|
||||||
pmb.aportgen.generate(args, args.package)
|
for package in args.packages:
|
||||||
|
pmb.aportgen.generate(args, package)
|
||||||
|
|
||||||
|
|
||||||
def build(args):
|
def build(args):
|
||||||
pmb.build.package(args, args.package, args.arch, args.force,
|
for package in args.packages:
|
||||||
|
pmb.build.package(args, package, args.arch, args.force,
|
||||||
args.buildinfo)
|
args.buildinfo)
|
||||||
|
|
||||||
|
|
||||||
def build_init(args):
|
def build_init(args):
|
||||||
pmb.build.init(args, args.suffix)
|
suffix = _parse_suffix(args)
|
||||||
|
pmb.build.init(args, suffix)
|
||||||
|
|
||||||
|
|
||||||
def challenge(args):
|
def challenge(args):
|
||||||
|
@ -53,12 +68,15 @@ def challenge(args):
|
||||||
|
|
||||||
|
|
||||||
def checksum(args):
|
def checksum(args):
|
||||||
pmb.build.checksum(args, args.package)
|
for package in args.packages:
|
||||||
|
pmb.build.checksum(args, package)
|
||||||
|
|
||||||
|
|
||||||
def chroot(args):
|
def chroot(args):
|
||||||
pmb.chroot.apk.check_min_version(args, args.suffix)
|
suffix = _parse_suffix(args)
|
||||||
pmb.chroot.root(args, args.command, args.suffix, log=False)
|
pmb.chroot.apk.check_min_version(args, suffix)
|
||||||
|
logging.info("(" + suffix + ") % " + " ".join(args.command))
|
||||||
|
pmb.chroot.root(args, args.command, suffix, log=False)
|
||||||
|
|
||||||
|
|
||||||
def index(args):
|
def index(args):
|
||||||
|
|
|
@ -145,14 +145,22 @@ def arguments():
|
||||||
stats = sub.add_parser("stats", help="show ccache stats")
|
stats = sub.add_parser("stats", help="show ccache stats")
|
||||||
stats.add_argument("--arch")
|
stats.add_argument("--arch")
|
||||||
|
|
||||||
# Action: chroot / build_init / kernel
|
# Action: build_init / chroot
|
||||||
build_init = sub.add_parser("build_init", help="initialize build"
|
build_init = sub.add_parser("build_init", help="initialize build"
|
||||||
" environment (usually you do not need to call this)")
|
" environment (usually you do not need to call this)")
|
||||||
chroot = sub.add_parser("chroot", help="start shell in chroot")
|
chroot = sub.add_parser("chroot", help="start shell in chroot")
|
||||||
chroot.add_argument("command", default=["sh"], help="command"
|
chroot.add_argument("command", default=["sh"], help="command"
|
||||||
" to execute inside the chroot. default: sh", nargs='*')
|
" to execute inside the chroot. default: sh", nargs='*')
|
||||||
for action in [build_init, chroot]:
|
for action in [build_init, chroot]:
|
||||||
action.add_argument("--suffix", default="native")
|
suffix = action.add_mutually_exclusive_group()
|
||||||
|
suffix.add_argument("--rootfs", action="store_true",
|
||||||
|
help="Chroot for the device root file system")
|
||||||
|
suffix.add_argument("--buildroot", action="store_true",
|
||||||
|
help="Chroot for building packages for the device "
|
||||||
|
"architecture")
|
||||||
|
suffix.add_argument("--suffix", default=None,
|
||||||
|
help="Specify any chroot suffix, defaults to"
|
||||||
|
" 'native'")
|
||||||
|
|
||||||
# Action: install
|
# Action: install
|
||||||
install = sub.add_parser("install", help="set up device specific" +
|
install = sub.add_parser("install", help="set up device specific" +
|
||||||
|
@ -166,11 +174,15 @@ def arguments():
|
||||||
install.add_argument("--no-fde", help="do not use full disk encryption",
|
install.add_argument("--no-fde", help="do not use full disk encryption",
|
||||||
action="store_false", dest="full_disk_encryption")
|
action="store_false", dest="full_disk_encryption")
|
||||||
|
|
||||||
# Action: build / checksum / menuconfig / parse_apkbuild / aportgen
|
# Action: menuconfig / parse_apkbuild
|
||||||
menuconfig = sub.add_parser("menuconfig", help="run menuconfig on"
|
menuconfig = sub.add_parser("menuconfig", help="run menuconfig on"
|
||||||
" a kernel aport")
|
" a kernel aport")
|
||||||
checksum = sub.add_parser("checksum", help="update aport checksums")
|
|
||||||
parse_apkbuild = sub.add_parser("parse_apkbuild")
|
parse_apkbuild = sub.add_parser("parse_apkbuild")
|
||||||
|
for action in [menuconfig, parse_apkbuild]:
|
||||||
|
action.add_argument("package")
|
||||||
|
|
||||||
|
# Action: build / checksum / aportgen
|
||||||
|
checksum = sub.add_parser("checksum", help="update aport checksums")
|
||||||
aportgen = sub.add_parser("aportgen", help="generate a package build recipe"
|
aportgen = sub.add_parser("aportgen", help="generate a package build recipe"
|
||||||
" (aport/APKBUILD) based on an upstream aport from Alpine")
|
" (aport/APKBUILD) based on an upstream aport from Alpine")
|
||||||
build = sub.add_parser("build", help="create a package for a"
|
build = sub.add_parser("build", help="create a package for a"
|
||||||
|
@ -178,8 +190,8 @@ def arguments():
|
||||||
build.add_argument("--arch")
|
build.add_argument("--arch")
|
||||||
build.add_argument("--force", action="store_true")
|
build.add_argument("--force", action="store_true")
|
||||||
build.add_argument("--buildinfo", action="store_true")
|
build.add_argument("--buildinfo", action="store_true")
|
||||||
for action in [checksum, build, menuconfig, parse_apkbuild, aportgen]:
|
for action in [checksum, build, aportgen]:
|
||||||
action.add_argument("package")
|
action.add_argument("packages", nargs="+")
|
||||||
|
|
||||||
# Action: challenge
|
# Action: challenge
|
||||||
challenge = sub.add_parser("challenge",
|
challenge = sub.add_parser("challenge",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue