Skip to content

Commit

Permalink
Merge pull request #64 from itoffshore/pkgctl
Browse files Browse the repository at this point in the history
update to 0.6.1
  • Loading branch information
itoffshore authored Jun 20, 2023
2 parents ef60c02 + 7285a7e commit 0967d83
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 75 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version [0.6.1] - 20230620
- replace devtools dependency with git & update patches:
- linux.patch
- linux-zen.patch
- linux-libre.patch

Version [0.6.0] - 20230611
- replace asp with devtools (pkgctl)

Expand Down
60 changes: 39 additions & 21 deletions patches/linux-libre.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
--- PKGBUILD.orig 2022-05-04 05:33:52.227378497 +0100
+++ PKGBUILD 2022-05-04 05:35:20.872739319 +0100
@@ -25,7 +25,7 @@ arch=(i686 x86_64 armv7h)
license=(GPL2)
makedepends=(
bc libelf pahole cpio perl tar xz
- xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick texlive-latexextra
+ xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick
git
--- PKGBUILD.orig 2023-06-20 19:54:25.599202270 +0100
+++ PKGBUILD 2023-06-20 19:56:47.926087751 +0100
@@ -35,11 +35,11 @@ makedepends=(
xz

# htmldocs
- graphviz
- imagemagick
- python-sphinx
- texlive-latexextra
- xmlto
+ #graphviz
+ #imagemagick
+ #python-sphinx
+ #texlive-latexextra
+ #xmlto
)
makedepends=( ${makedepends[*]/git/} )
@@ -146,7 +146,34 @@ export KBUILD_BUILD_USER=$pkgbase
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
makedepends_armv7h=(uboot-tools vboot-utils dtc) # required by linux-libre-chromebook
options=('!strip')
@@ -136,7 +136,34 @@ _make() {
}

prepare() {
- cd $_srcname
Expand Down Expand Up @@ -45,7 +53,17 @@

if [ "${_srcname##*-}" != "$pkgver" ]; then
echo "Applying upstream patch..."
@@ -341,6 +368,33 @@ _package-headers() {
@@ -195,7 +222,8 @@ prepare() {

build() {
cd $_srcname
- _make htmldocs all
+# _make htmldocs all
+ _make all
}

_package() {
@@ -332,6 +360,33 @@ _package-headers() {
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
Expand Down Expand Up @@ -79,12 +97,12 @@
}

_package-docs() {
@@ -393,7 +447,7 @@ _package-chromebook() {
cp vmlinux.kpart "$pkgdir/boot"
}

-pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs")
+pkgname=("$pkgbase" "$pkgbase-headers")
[[ $CARCH = armv7h ]] && pkgname+=("$pkgbase-chromebook")
@@ -384,7 +439,7 @@ _package-chromebook() {
pkgname=(
"$pkgbase"
"$pkgbase-headers"
- "$pkgbase-docs"
+# "$pkgbase-docs"
)
[ "$CARCH" = "armv7h" ] && pkgname+=("$pkgbase-chromebook")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
30 changes: 18 additions & 12 deletions patches/linux-zen.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
--- PKGBUILD.orig 2023-05-06 13:14:21.510529144 +0100
+++ PKGBUILD 2023-05-06 13:20:59.342063870 +0100
@@ -23,7 +23,7 @@ makedepends=(
graphviz
imagemagick
python-sphinx
--- PKGBUILD.orig 2023-06-20 19:44:35.608040306 +0100
+++ PKGBUILD 2023-06-20 19:47:33.966796172 +0100
@@ -20,10 +20,10 @@ makedepends=(
xz

# htmldocs
- graphviz
- imagemagick
- python-sphinx
- texlive-latexextra
+ # texlive-latexextra
xmlto
+ #graphviz
+ #imagemagick
+ #python-sphinx
+ #texlive-latexextra
)
options=('!strip')
@@ -51,7 +51,34 @@ _make() {
_srcname=zen-kernel
@@ -50,7 +50,34 @@ _make() {
}

prepare() {
Expand Down Expand Up @@ -45,7 +51,7 @@

echo "Setting version..."
echo "-$pkgrel" > localversion.10-pkgrel
@@ -79,7 +106,8 @@ prepare() {
@@ -78,7 +105,8 @@ prepare() {

build() {
cd $_srcname
Expand All @@ -55,7 +61,7 @@
}

_package() {
@@ -202,6 +230,33 @@ _package-headers() {
@@ -201,6 +229,33 @@ _package-headers() {
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
Expand Down Expand Up @@ -89,7 +95,7 @@
}

_package-docs() {
@@ -226,7 +281,7 @@ _package-docs() {
@@ -225,7 +280,7 @@ _package-docs() {
pkgname=(
"$pkgbase"
"$pkgbase-headers"
Expand Down
55 changes: 31 additions & 24 deletions patches/linux.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
--- PKGBUILD.orig 2022-05-04 05:38:47.040776771 +0100
+++ PKGBUILD 2022-05-04 05:40:14.029231753 +0100
@@ -10,7 +10,7 @@ arch=(x86_64)
license=(GPL2)
makedepends=(
bc libelf pahole cpio perl tar xz
- xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick texlive-latexextra
+ xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick
git
--- PKGBUILD.orig 2023-06-20 19:49:48.341750965 +0100
+++ PKGBUILD 2023-06-20 19:52:46.593947580 +0100
@@ -20,10 +20,10 @@ makedepends=(
xz

# htmldocs
- graphviz
- imagemagick
- python-sphinx
- texlive-latexextra
+ #graphviz
+ #imagemagick
+ #python-sphinx
+ #texlive-latexextra
)
options=('!strip')
@@ -33,7 +33,34 @@ export KBUILD_BUILD_USER=$pkgbase
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
_srcname=archlinux-linux
@@ -50,7 +50,34 @@ _make() {
}

prepare() {
- cd $_srcname
Expand Down Expand Up @@ -44,17 +50,18 @@
+# cd $_srcname

echo "Setting version..."
scripts/setlocalversion --save-scmversion
@@ -61,7 +88,7 @@ prepare() {
echo "-$pkgrel" > localversion.10-pkgrel
@@ -78,7 +105,8 @@ prepare() {

build() {
cd $_srcname
make all
- make htmldocs
+# make htmldocs
- _make htmldocs all
+# _make htmldocs all
+ _make all
}

_package() {
@@ -172,6 +199,33 @@ _package-headers() {
@@ -201,6 +229,33 @@ _package-headers() {
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
Expand Down Expand Up @@ -88,12 +95,12 @@
}

_package-docs() {
@@ -193,7 +247,7 @@ _package-docs() {
ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
}

-pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs")
+pkgname=("$pkgbase" "$pkgbase-headers")
@@ -225,7 +280,7 @@ _package-docs() {
pkgname=(
"$pkgbase"
"$pkgbase-headers"
- "$pkgbase-docs"
+# "$pkgbase-docs"
)
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
32 changes: 14 additions & 18 deletions scripts/abk
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ check_kernel() {
elif echo "$AUR_KERNELS" | grep -qw "$KERNEL"; then
REPO='aur'
else

warning "Add '$KERNEL' to AUR_KERNELS in: $USER_CONFIG"
msg2 "Assuming '$KERNEL' is from AUR"
REPO='aur'
Expand Down Expand Up @@ -408,7 +407,7 @@ install_kernel() {
}

update_kernel() {
local kernel_repo=$1 archive=$2 git_retval=
local kernel_repo=$1 archive=$2 git_retval= repo_url=
local err_msg="Retrieving '$KERNEL' PKGBUILD failed."

if [ ! -d $BUILD_DIR ]; then
Expand All @@ -430,25 +429,22 @@ update_kernel() {

# download PKGBUILD
if [ "$kernel_repo" = "main" ]; then

if ! pkgctl repo clone --protocol=https "$KERNEL"; then
error "$err_msg"
die "$KBUILD_DIR"
fi

repo_url=https://gitlab.archlinux.org/archlinux/packaging/packages/"$KERNEL".git
elif [ "$kernel_repo" = "aur" ]; then
git clone https://aur.archlinux.org/"$KERNEL".git
git_retval=$?

case "$git_retval" in
128) error "$err_msg"; die "$KBUILD_DIR" ;;
0) if [ ! -f "$KBUILD_DIR"/PKGBUILD ]; then
error "Non existent AUR kernel"; die "$KBUILD_DIR"
fi ;;
*) warning "Untrapped git_retval: $git_retval"; die ;;
esac
repo_url=https://aur.archlinux.org/"$KERNEL".git
fi

git clone "$repo_url"
git_retval=$?

case "$git_retval" in
128) error "$err_msg"; die "$KBUILD_DIR" ;;
0) if [ ! -f "$KBUILD_DIR"/PKGBUILD ]; then
error "Non existent AUR kernel"; die "$KBUILD_DIR"
fi ;;
*) warning "Untrapped git_retval: $git_retval"; die ;;
esac

# automated update
patch_pkgbuild
}
Expand Down

0 comments on commit 0967d83

Please sign in to comment.