From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] common/hooks/do-extract/00-distfiles.sh: support deb files
Date: Thu, 10 Nov 2022 09:37:37 +0100 [thread overview]
Message-ID: <20221110083737.42dIfJ7IK8BahplfYE5B1Z2n7zniXPXbvQ0RnNjJpAo@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40405@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 648 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages deb-extract
https://github.com/void-linux/void-packages/pull/40405
common/hooks/do-extract/00-distfiles.sh: support deb files
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
TODO: convert all deb packages to use this isntead of overriding do_extract or build_style=fetch or something
A patch file from https://github.com/void-linux/void-packages/pull/40405.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-deb-extract-40405.patch --]
[-- Type: text/x-diff, Size: 8354 bytes --]
From bcd4e4298611bbea5f745983bafad7a422494cdb Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 8 Nov 2022 22:36:31 -0500
Subject: [PATCH 1/5] common/hooks/do-extract/00-distfiles.sh: support deb
files
---
| 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
--git a/common/hooks/do-extract/00-distfiles.sh b/common/hooks/do-extract/00-distfiles.sh
index c173fe2af1ea..b3f3b90b7b80 100644
--- a/common/hooks/do-extract/00-distfiles.sh
+++ b/common/hooks/do-extract/00-distfiles.sh
@@ -3,7 +3,7 @@
hook() {
local srcdir="$XBPS_SRCDISTDIR/$pkgname-$version"
- local f j curfile found extractdir innerdir num_dirs
+ local f j curfile found extractdir innerdir innerfile num_dirs
local TAR_CMD
if [ -z "$distfiles" -a -z "$checksum" ]; then
@@ -62,6 +62,7 @@ hook() {
*.tar) cursufx="tar";;
*.zip) cursufx="zip";;
*.rpm) cursufx="rpm";;
+ *.deb) cursufx="deb";;
*.patch) cursufx="txt";;
*.diff) cursufx="txt";;
*.txt) cursufx="txt";;
@@ -84,7 +85,7 @@ hook() {
cd "$extractdir"
case ${cursufx} in
gz)
- gunzip -f $curfile
+ gunzip -f $curfile
;;
bz2)
bunzip2 -f $curfile
@@ -120,6 +121,17 @@ hook() {
msg_error "$pkgver: cannot find rpmextract for extraction.\n"
fi
;;
+ deb)
+ if command -v bsdtar &>/dev/null; then
+ bsdtar -x -O -f "$srcdir/$curfile" "data.tar.*" |
+ bsdtar -C "$extractdir" -x --no-same-permissions --no-same-owner
+ if [ $? -ne 0 ]; then
+ msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
+ fi
+ else
+ msg_error "$pkgver: cannot find bsdtar for extraction.\n"
+ fi
+ ;;
txt)
cp -f $srcdir/$curfile "$extractdir"
;;
From 2f90c21e906bc3764ca1b608748f2e276fea9129 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 10 Nov 2022 03:28:38 -0500
Subject: [PATCH 2/5] bitwig-studio: don't manually extract deb
---
srcpkgs/bitwig-studio/template | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/srcpkgs/bitwig-studio/template b/srcpkgs/bitwig-studio/template
index 894ac6e30207..feca298e7a08 100644
--- a/srcpkgs/bitwig-studio/template
+++ b/srcpkgs/bitwig-studio/template
@@ -8,22 +8,14 @@ short_desc="DAW for music production, remixing and live performance"
maintainer="Alessandro Saglia <ale.saglia@gmail.com>"
license="custom:bitwig"
homepage="https://bitwig.com/"
-_file="bitwig-studio-${version}.deb"
-distfiles="https://downloads.bitwig.com/stable/${version}/${_file}"
+distfiles="https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb"
checksum=ca10802a56cb8f2072c244986356aa6d41859401c12d1f20f313c322aa142199
nostrip=yes
restricted=yes
repository=nonfree
-do_extract() {
- mkdir -p ${DESTDIR}
- ar x ${XBPS_SRCDISTDIR}/bitwig-studio-${version}/${_file}
-}
-
do_install() {
- bsdtar -xf data.tar.xz -C ${DESTDIR}
-}
-
-post_install() {
- vlicense ${DESTDIR}/opt/bitwig-studio/EULA.rtf
+ vcopy opt /
+ vcopy usr /
+ vlicense ${DESTDIR}/opt/bitwig-studio/EULA.txt
}
From 2f825ed24ba2f48d09521d79b43a5ca7f0cbf77c Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 10 Nov 2022 03:29:25 -0500
Subject: [PATCH 3/5] brother-brscan3: don't manually extract deb
---
srcpkgs/brother-brscan3/template | 36 ++++++++++++--------------------
1 file changed, 13 insertions(+), 23 deletions(-)
diff --git a/srcpkgs/brother-brscan3/template b/srcpkgs/brother-brscan3/template
index 3a0e1e9bd10a..3b8ad08ad328 100644
--- a/srcpkgs/brother-brscan3/template
+++ b/srcpkgs/brother-brscan3/template
@@ -3,8 +3,6 @@ pkgname=brother-brscan3
version=0.2.13
revision=2
archs="i686 x86_64"
-create_wrksrc=yes
-hostmakedepends="tar"
makedepends="sane-devel curl"
depends="sane"
short_desc="SANE scanner driver for brscan3-compatible Brother scanners"
@@ -27,27 +25,6 @@ elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
mylibdir="lib"
fi
-do_extract() {
- ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/brscan3-${version}-${debpkgid}.deb
- cd ${wrksrc}
- bsdtar xzpvf data.tar.gz
-}
-
-do_install() {
- # dlls and symlink (correctly put in /usr/lib)
- cd ${wrksrc}
- vinstall ./usr/${mylibdir}/sane/libsane-brother3.so.1.0.7 755 usr/lib/sane
- ln -sf /usr/lib/sane/libsane-brother3.so.1.0.7 ${DESTDIR}/usr/lib/sane/libsane-brother3.so.1
- ln -sf /usr/lib/sane/libsane-brother3.so.1.0.7 ${DESTDIR}/usr/lib/sane/libsane-brother3.so
- vinstall ./usr/${mylibdir}/libbrscandec3.so.1.0.0 755 usr/lib
- ln -sf /usr/lib/libbrscandec3.so.1.0.0 ${DESTDIR}/usr/lib/libbrscandec3.so.1
- ln -sf /usr/lib/libbrscandec3.so.1.0.0 ${DESTDIR}/usr/lib/libbrscandec3.so
- vmkdir /opt/Brother
- vcopy "./usr/local/Brother/*" /opt/Brother/
- chmod o-w ${DESTDIR}/opt/Brother/sane/brsanenetdevice3.cfg
- vlicense LICENSE
-}
-
post_extract() {
curl -sk https://support.brother.com/g/s/agreement/English_lpr/agree.html | \
sed -n \
@@ -64,3 +41,16 @@ post_extract() {
msg_error "SHA256 mismatch for LICENSE:\n$filesum\n"
fi
}
+
+do_install() {
+ vinstall ${mylibdir}/sane/libsane-brother3.so.1.0.7 755 usr/lib/sane
+ ln -sf /usr/lib/sane/libsane-brother3.so.1.0.7 ${DESTDIR}/usr/lib/sane/libsane-brother3.so.1
+ ln -sf /usr/lib/sane/libsane-brother3.so.1.0.7 ${DESTDIR}/usr/lib/sane/libsane-brother3.so
+ vinstall ${mylibdir}/libbrscandec3.so.1.0.0 755 usr/lib
+ ln -sf /usr/lib/libbrscandec3.so.1.0.0 ${DESTDIR}/usr/lib/libbrscandec3.so.1
+ ln -sf /usr/lib/libbrscandec3.so.1.0.0 ${DESTDIR}/usr/lib/libbrscandec3.so
+ vmkdir /opt
+ vcopy local/Brother /opt
+ chmod o-w ${DESTDIR}/opt/Brother/sane/brsanenetdevice3.cfg
+ vlicense LICENSE
+}
From 37990f7d373219a9d78ed5c25d6189b4d3828b72 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 10 Nov 2022 03:33:40 -0500
Subject: [PATCH 4/5] brother-dcp197c-cupswrapper: don't manually extract deb
---
srcpkgs/brother-dcp197c-cupswrapper/template | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/srcpkgs/brother-dcp197c-cupswrapper/template b/srcpkgs/brother-dcp197c-cupswrapper/template
index 0f71ea4ae0ad..8027b7c386e7 100644
--- a/srcpkgs/brother-dcp197c-cupswrapper/template
+++ b/srcpkgs/brother-dcp197c-cupswrapper/template
@@ -3,7 +3,6 @@ pkgname=brother-dcp197c-cupswrapper
version=1.1.3
revision=8
archs="i686 x86_64"
-create_wrksrc=yes
depends="brother-dcp197c-lpr cups"
short_desc="CUPS wrapper driver for the brother DCP-197C printer/scanner"
maintainer="Orphaned <orphan@voidlinux.org>"
@@ -13,13 +12,9 @@ distfiles="https://download.brother.com/welcome/dlf005405/dcp197ccupswrapper-${v
checksum="d3ebfad8231939900b8041022d6c35a0ee7a1a417f7ffdab2ae371b54a00bab8"
nopie=yes
-do_extract() {
- ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/dcp197ccupswrapper-${version}-1.i386.deb
-}
-
do_install() {
- mkdir -p ${DESTDIR}
- bsdtar xzpvf data.tar.gz -C ${DESTDIR}
+ vmkdir /opt
+ vcopy brother /opt
rm ${DESTDIR}/opt/brother/Printers/dcp197c/cupswrapper/cupswrapperdcp197c
vinstall ${FILESDIR}/cupswrapper.void 755 /opt/brother/Printers/dcp197c/cupswrapper/
vinstall ${FILESDIR}/43-cups-usb.rules 644 /usr/lib/udev/rules.d/
From 9e885ec22188fc86cb5024865214b408957d5ac5 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 10 Nov 2022 03:36:07 -0500
Subject: [PATCH 5/5] brother-dcp197c-lpr: don't manually extract deb
---
srcpkgs/brother-dcp197c-lpr/template | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/srcpkgs/brother-dcp197c-lpr/template b/srcpkgs/brother-dcp197c-lpr/template
index 3d4067d2c9a9..d72790ea9b82 100644
--- a/srcpkgs/brother-dcp197c-lpr/template
+++ b/srcpkgs/brother-dcp197c-lpr/template
@@ -3,7 +3,6 @@ pkgname=brother-dcp197c-lpr
version=1.1.3
revision=6
archs="i686 x86_64"
-create_wrksrc=yes
depends="a2ps ghostscript"
short_desc="LPR driver for the brother DCP-197C printer/scanner"
maintainer="Orphaned <orphan@voidlinux.org>"
@@ -18,11 +17,7 @@ if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
depends+=" glibc-32bit"
fi
-do_extract() {
- ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/dcp197clpr-${version}-1.i386.deb
-}
-
do_install() {
- mkdir -p ${DESTDIR}
- bsdtar xzpvf data.tar.gz -C ${DESTDIR}
+ vcopy opt /
+ vcopy usr /
}
next prev parent reply other threads:[~2022-11-10 8:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 6:08 [PR PATCH] " classabbyamp
2022-11-09 11:12 ` [PR PATCH] [Updated] " sgn
2022-11-10 8:14 ` classabbyamp
2022-11-10 8:37 ` classabbyamp [this message]
2022-11-10 9:21 ` classabbyamp
2022-11-10 9:23 ` classabbyamp
2022-11-10 9:34 ` classabbyamp
2022-11-11 8:03 ` classabbyamp
2022-11-11 8:04 ` classabbyamp
2022-11-11 8:16 ` [PR PATCH] [Updated] " classabbyamp
2022-11-11 9:03 ` [PR REVIEW] " sgn
2022-11-11 9:03 ` sgn
2022-11-11 11:21 ` classabbyamp
2022-11-11 11:25 ` [PR PATCH] [Updated] " classabbyamp
2022-11-17 2:42 ` classabbyamp
2022-11-19 4:19 ` [PR PATCH] [Updated] " classabbyamp
2022-11-19 4:32 ` classabbyamp
2022-11-19 4:47 ` [PR PATCH] [Merged]: " classabbyamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221110083737.42dIfJ7IK8BahplfYE5B1Z2n7zniXPXbvQ0RnNjJpAo@z \
--to=classabbyamp@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).