commit b1d857c2839e5a1990fa3e98380d70ec204a8109 Author: BigfootACA Date: Wed Mar 13 09:54:23 2024 +0800 Initial commit diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..00317ca --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = xrock-git + pkgdesc = The low level tools for rockchip SOC with maskrom and loader mode support. + pkgver = 1.0.4.r5.gbb62b28 + pkgrel = 11 + url = https://github.com/xboot/xrock + arch = x86_64 + arch = aarch64 + arch = riscv64 + license = MIT + makedepends = git + makedepends = gcc + depends = libusb + provides = xrock + conflicts = xrock + source = xrock::git+https://github.com/xboot/xrock.git + sha256sums = SKIP + +pkgname = xrock-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..867a007 --- /dev/null +++ b/.gitignore @@ -0,0 +1,53 @@ +*.rej +*.orig +*.swp +*.save* +*.o +*.a +*.out +*.lib +*.obj +*.dll +*.so +*.exe +*.gch +*.plist +*.mo +*.gmo +*.fd +*.iso +*.img +*.img.* +*.qcow2 +*.vhd +*.vdi +*.vmdk +*.cpio +*.cpio.* +*.ttf +*.ttc +*.pcf +*.pcf.* +*.efi +*.pkg.tar.* +vgcore.* +/build* +initramfs*.* +initrd*.* +System.map* +/cmake-build-* +/.idea +/.vscode +/.cache +CMakeCache.txt +CMakeFiles +Makefile +cmake_install.cmake +node_modules +package.json +package-lock.json +fonts.scale +fonts.dir +/src +/pkg +/xrock diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..70dbddb --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,44 @@ +pipeline { + agent { + label 'aarch64 && archlinux' + } + stages { + stage('Download Config') { + steps { + dir('jenkins-utils') { + git 'https://gitlab.classfun.cn:4443/renegade-project/jenkins-utils' + } + } + } + stage('Cleanup packages') { + steps { + sh 'rm -f *.pkg.tar.*' + } + } + stage('Build') { + steps { + sh 'makepkg --config jenkins-utils/makepkg-aarch64.conf --syncdeps --noconfirm --force' + } + } + stage('Signature packages') { + steps { + withCredentials([ + file(credentialsId: 'gpg-file', variable: 'GPG_FILE'), + string(credentialsId: 'gpg-secret', variable: 'GPG_SECRET') + ]) { + sh 'python3 jenkins-utils/sign-pkg.py -d . -k "$GPG_FILE" -p "$GPG_SECRET"' + } + } + } + stage('Upload packages') { + steps { + sh 'python3 jenkins-utils/upload-pkg.py -d . -a aarch64' + } + } + stage('Archive') { + steps { + archiveArtifacts artifacts: '*.pkg.tar.*', fingerprint: true + } + } + } +} diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..2c11544 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: taotieren +# Maintainer: BigfootACA + +pkgname=xrock +pkgver=1.0.4.r5.gbb62b28 +pkgrel=11 +epoch= +pkgdesc="The low level tools for rockchip SOC with maskrom and loader mode support." +arch=(x86_64 aarch64 armv7 riscv64) +url="https://github.com/xboot/xrock" +license=('MIT') +depends=('libusb') +makedepends=('git' 'gcc') +optdepends=() +provides=(${pkgname%-git}) +conflicts=(${pkgname%-git}) +source=("${pkgname%-git}::git+${url}.git") +sha256sums=('SKIP') + +pkgver(){ + cd "${srcdir}/${pkgname%-git}" + git describe --long --tags | sed 's/^v//g' | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare(){ + git -C "${srcdir}/${pkgname%-git}" clean -dfx +} + +build(){ + cd "${srcdir}/${pkgname%-git}" + make +} + +package(){ + install -Dm0755 "${srcdir}/${pkgname%-git}/${pkgname%-git}" "${pkgdir}/usr/bin/${pkgname%-git}" + install -Dm0644 "${srcdir}/${pkgname%-git}/99-xrock.rules" "${pkgdir}/etc/udev/rules.d/99-xrock.rules" + install -Dm0644 "${srcdir}/${pkgname%-git}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +}