2017-05-26 20:35:21 +00:00
|
|
|
"""
|
2018-01-04 03:53:35 +00:00
|
|
|
Copyright 2018 Oliver Smith
|
2017-05-26 20:35:21 +00:00
|
|
|
|
|
|
|
This file is part of pmbootstrap.
|
|
|
|
|
|
|
|
pmbootstrap is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
pmbootstrap is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with pmbootstrap. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
"""
|
|
|
|
import logging
|
|
|
|
|
|
|
|
import pmb.chroot
|
|
|
|
import pmb.build
|
|
|
|
import pmb.helpers.run
|
2017-07-28 22:34:40 +00:00
|
|
|
import pmb.build.other
|
2017-05-26 20:35:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
def checksum(args, pkgname):
|
|
|
|
pmb.build.init(args)
|
|
|
|
pmb.build.copy_to_buildpath(args, pkgname)
|
|
|
|
logging.info("(native) generate checksums for " + pkgname)
|
|
|
|
pmb.chroot.user(args, ["abuild", "checksum"],
|
2017-10-12 20:08:10 +00:00
|
|
|
working_dir="/home/pmos/build")
|
2017-05-26 20:35:21 +00:00
|
|
|
|
|
|
|
# Copy modified APKBUILD back
|
2017-10-12 20:08:10 +00:00
|
|
|
source = args.work + "/chroot_native/home/pmos/build/APKBUILD"
|
2017-07-28 22:34:40 +00:00
|
|
|
target = pmb.build.other.find_aport(args, pkgname) + "/"
|
2017-05-26 20:35:21 +00:00
|
|
|
pmb.helpers.run.user(args, ["cp", source, target])
|