Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common/hooks/do-extract/00-distfiles.sh: support deb files #40405

Merged
merged 21 commits into from
Nov 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
111d670
common/hooks/do-extract/00-distfiles.sh: support deb files
classabbyamp Nov 9, 2022
01ffb97
bitwig-studio: don't manually extract deb
classabbyamp Nov 10, 2022
4b23c3c
brother-brscan3: don't manually extract deb
classabbyamp Nov 10, 2022
cf632fe
brother-dcp197c-cupswrapper: don't manually extract deb
classabbyamp Nov 10, 2022
e360dd1
brother-dcp197c-lpr: don't manually extract deb
classabbyamp Nov 10, 2022
a4db98d
clearlooks-phenix-darkpurpy-theme: don't manually extract deb
classabbyamp Nov 10, 2022
2c28295
debootstrap: don't manually extract deb
classabbyamp Nov 10, 2022
7ddc20f
fah: don't manually extract deb
classabbyamp Nov 10, 2022
2ba5f90
google-chrome: don't manually extract deb
classabbyamp Nov 10, 2022
7269e44
google-earth-pro: don't manually extract deb
classabbyamp Nov 10, 2022
de6d677
helden-software: don't manually extract deb
classabbyamp Nov 10, 2022
cbfc487
msbuild-bin: don't manually extract deb
classabbyamp Nov 10, 2022
f32c898
openbazaar: don't manually extract deb
classabbyamp Nov 11, 2022
609fd1d
parsec: don't manually extract deb
classabbyamp Nov 11, 2022
7a948ff
protonmail-bridge: don't manually extract deb
classabbyamp Nov 11, 2022
ec2cd03
slack-desktop: don't manually extract deb
classabbyamp Nov 11, 2022
baf058d
spotify: don't manually extract deb
classabbyamp Nov 11, 2022
f73fe5e
teams-bin: don't manually extract deb
classabbyamp Nov 11, 2022
cbe8c5a
vivaldi: don't manually extract deb
classabbyamp Nov 11, 2022
8fd242b
xkb-qwerty-fr: don't manually extract deb
classabbyamp Nov 11, 2022
355cbcd
yandex-disk: update to 0.1.6.1080
classabbyamp Nov 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions common/hooks/do-extract/00-distfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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";;
Expand All @@ -84,7 +85,7 @@ hook() {
cd "$extractdir"
case ${cursufx} in
gz)
gunzip -f $curfile
gunzip -f $curfile
;;
bz2)
bunzip2 -f $curfile
Expand Down Expand Up @@ -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"
;;
Expand Down
16 changes: 4 additions & 12 deletions srcpkgs/bitwig-studio/template
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
50 changes: 21 additions & 29 deletions srcpkgs/brother-brscan3/template
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version=0.2.13
revision=2
archs="i686 x86_64"
create_wrksrc=yes
hostmakedepends="tar"
makedepends="sane-devel curl"
hostmakedepends="curl"
makedepends="sane-devel"
depends="sane"
short_desc="SANE scanner driver for brscan3-compatible Brother scanners"
maintainer="Orphaned <orphan@voidlinux.org>"
Expand All @@ -16,38 +16,13 @@ nodebug=yes
_license_checksum=4ab8b9269a74377ee85458cc4dfbacfbf6d26665426572fe16f7102af214bd3c

if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
debpkgid="1.amd64"
distfiles="https://download.brother.com/welcome/dlf006642/brscan3-${version}-${debpkgid}.deb"
distfiles="https://download.brother.com/welcome/dlf006642/brscan3-${version}-1.amd64.deb"
checksum="446adf531bf39032892e9504ce34b7bf889e0f8628c0732cebb3b83fafb327b8"
mylibdir="lib64"
elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
debpkgid="1.i386"
distfiles="https://download.brother.com/welcome/dlf006641/brscan3-${version}-${debpkgid}.deb"
distfiles="https://download.brother.com/welcome/dlf006641/brscan3-${version}-1.i386.deb"
checksum="ad06665cac32035893f614d9305dabf73145af454f1aeb6b8b7c7fa2700fe2e6"
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 \
Expand All @@ -63,4 +38,21 @@ post_extract() {
if [ "$filesum" != "$_license_checksum" ]; then
msg_error "SHA256 mismatch for LICENSE:\n$filesum\n"
fi

if [ -d usr/lib64 ]; then
mv usr/lib64 usr/lib
fi
}

do_install() {
vinstall usr/lib/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/lib/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 usr/local/Brother /opt
chmod o-w ${DESTDIR}/opt/Brother/sane/brsanenetdevice3.cfg
vlicense LICENSE
}
7 changes: 1 addition & 6 deletions srcpkgs/brother-dcp197c-cupswrapper/template
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,8 @@ 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}
vcopy opt /
sgn marked this conversation as resolved.
Show resolved Hide resolved
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/
Expand Down
9 changes: 2 additions & 7 deletions srcpkgs/brother-dcp197c-lpr/template
Original file line number Diff line number Diff line change
Expand Up @@ -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>"
Expand All @@ -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 /
}
7 changes: 2 additions & 5 deletions srcpkgs/clearlooks-phenix-darkpurpy-theme/template
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pkgname=clearlooks-phenix-darkpurpy-theme
version=7.0.2
revision=2
_devuan_rel="1+devuan2.0"
build_style=fetch
depends="gnome-themes-standard gtk-engine-murrine gtk2-engines"
short_desc="Dark-purpified GTK3 port of Clearlooks theme"
maintainer="Orphaned <orphan@voidlinux.org>"
Expand All @@ -13,8 +12,6 @@ distfiles="http://packages.devuan.org/devuan/pool/main/c/${pkgname}/${pkgname}_$
checksum=6b3dd568cb1ee37c5758ef55338b2b8784e7409cb2239a5d4b53de7af2584970

do_install() {
bsdtar xf ${pkgname}_${version}-${_devuan_rel}_all.deb
bsdtar xf data.tar.xz
vmkdir usr/share/themes
vcopy usr/share/themes/Clearlooks-Phenix-DarkPurpy usr/share/themes
vmkdir usr/share
vcopy usr/share/themes usr/share
}
18 changes: 12 additions & 6 deletions srcpkgs/debootstrap/template
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
pkgname=debootstrap
version=1.0.128+nmu2
revision=1
build_style=fetch
depends="binutils gnupg gzip tar wget xz zstd"
short_desc="Bootstrap a basic Debian system"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="MIT"
homepage="http://packages.qa.debian.org/d/debootstrap.html"
distfiles="${DEBIAN_SITE}/main/d/${pkgname}/${pkgname}_${version}_all.deb
distfiles="${DEBIAN_SITE}/main/d/debootstrap/debootstrap_${version}_all.deb
${DEBIAN_SITE}/main/d/debian-archive-keyring/debian-archive-keyring_2021.1.1_all.deb"
checksum="284fd2a38bd3522bfaa475540d8c622dde29e465b3439223c950023c5a45df60
56beca470dcd9b6d7e6c3c9e9d702101e01e9467e62810a8c357bd7b9c26251d"
Expand All @@ -25,12 +24,19 @@ case "$XBPS_TARGET_MACHINE" in
*) broken="please add your architecture";;
esac

post_extract() {
for x in bullseye buster removed stretch; do
rm usr/share/keyrings/debian-archive-$x-*
done
rm -r usr/share/doc/debian-archive-keyring

mv usr/sbin usr/bin
echo ${_debarch} > usr/share/debootstrap/arch
}

do_install() {
bsdtar xOf ${pkgname}_${version}_all.deb data.tar.gz | bsdtar xvzf - -C ${DESTDIR}
bsdtar xOf debian-archive-keyring_2021.1.1_all.deb data.tar.xz | bsdtar xvJf - -C ${DESTDIR} ./usr/share/keyrings/debian-archive-keyring.gpg
mv ${DESTDIR}/usr/sbin ${DESTDIR}/usr/bin
vcopy usr /
sed -i 's|export PATH|export PATH="/usr/sbin:/sbin:/usr/bin:/bin"|' ${DESTDIR}/usr/bin/debootstrap
vlicense ${DESTDIR}/usr/share/doc/debootstrap/copyright LICENSE
rm ${DESTDIR}/usr/share/doc/debootstrap/copyright
echo ${_debarch} >${DESTDIR}/usr/share/debootstrap/arch
}
14 changes: 2 additions & 12 deletions srcpkgs/fah/template
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,12 @@ system_accounts="_fah"
_fah_homedir="/usr/libexec/_fah"
_fah_descr="Folding@Home user"

do_extract() {
ar p ${XBPS_SRCDISTDIR}/${pkgname}-${version}/fahclient_${version}_amd64.deb \
data.tar.xz | bsdtar -x -f -
ar p ${XBPS_SRCDISTDIR}/${pkgname}-${version}/fahcontrol_${version}-1_all.deb \
data.tar.xz | bsdtar -x -f -
ar p ${XBPS_SRCDISTDIR}/${pkgname}-${version}/fahviewer_${version}_amd64.deb \
data.tar.xz | bsdtar -x -f -
}

do_install() {
vmkdir usr
vcopy ${wrksrc}/usr/* usr
vcopy usr /
vsv FAHClient
mv -v ${DESTDIR}/usr/lib/python2.7/{dist,site}-packages
vlicense ${DESTDIR}/usr/share/doc/fahclient/copyright LICENSE.FAHClient
vlicense ${DESTDIR}/usr/share/doc/fahviewer/LICENSE LICENSE.FAHViewer
# Example file to modfiy or cut+paste from for /etc/sv/FAHClient/config
# Example file to modify or cut+paste from for /etc/sv/FAHClient/config
vsconf ${FILESDIR}/config.example
}
38 changes: 18 additions & 20 deletions srcpkgs/google-chrome/template
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,34 @@ version=107.0.5304.110
revision=1
_channel=stable
archs="x86_64"
hostmakedepends="tar xz python3 python3-html2text python3-setuptools"
hostmakedepends="python3-html2text python3-setuptools"
depends="gtk+3"
short_desc="Attempt at creating a safer, faster, and more stable browser"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="custom:chrome"
homepage="https://www.google.com/chrome/"
nostrip=yes
restricted=yes
repository=nonfree
skiprdeps="/opt/google/chrome/libqt5_shim.so"

_baseUrl="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable"
_filename="google-chrome-${_channel}_${version}-1_amd64.deb"
_chromeUrl="${_baseUrl}/${_filename}"
_licenseUrl="https://www.google.com/intl/en/chrome/terms/"

distfiles="$_chromeUrl"
distfiles="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-${_channel}_${version}-1_amd64.deb"
checksum=52e6d1be974c36cb40469f03b128cf21b36359a05fdadbb2e0379fbb17ef341b
_license_checksum=8023b18fb5118ef65d586363e53909861bd1a9676e5eb83c20fd3ac6e33ea0be

do_extract() {
mkdir -p ${DESTDIR}
ar x ${XBPS_SRCDISTDIR}/google-chrome-${version}/${_filename}
skiprdeps="/opt/google/chrome/libqt5_shim.so"
repository=nonfree
restricted=yes
nostrip=yes

post_extract() {
$XBPS_FETCH_CMD 'https://www.google.com/intl/en/chrome/terms/' -o google-chrome-eula.html
html2text google-chrome-eula.html | sed -n '/^#/,/^SEE/p' > google-chrome-eula.md
filesum="$(xbps-digest google-chrome-eula.md)"
if [ "$filesum" != "$_license_checksum" ]; then
msg_error "SHA256 mismatch for EULA:\n$filesum\n"
fi
}

do_install() {
tar xf data.tar.xz -C ${DESTDIR}
vcopy etc /
vcopy opt /
vcopy usr /

# Install the icons
for size in 16 24 32 48 64 128 256; do
Expand All @@ -47,10 +49,6 @@ do_install() {
# Remove the Debian/Ubuntu crontab
rm -rf ${DESTDIR}/etc
rm -rf ${DESTDIR}/opt/google/chrome/cron
}

post_install() {
xbps-fetch ${_licenseUrl} -o google-chrome-eula.html
cat google-chrome-eula.html | html2text >> google-chrome-eula.md
vlicense google-chrome-eula.md
}
28 changes: 10 additions & 18 deletions srcpkgs/google-earth-pro/template
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,32 @@ version=7.3.4.8738
revision=1
archs="x86_64"
depends="alsa-lib desktop-file-utils fontconfig glu gst-plugins-base1
hicolor-icon-theme libSM libXi libXrender libcups libproxy nss qt5-script qt5-sensors qt5-webkit"
hicolor-icon-theme libSM libXi libXrender libcups libproxy nss qt5-script
qt5-sensors qt5-webkit"
short_desc="Explore the far reaches of the world"
maintainer="Jason Manley <jason@jasondavid.tv>"
license="custom:Google"
homepage="https://www.google.com/earth/index.html"
distfiles="https://dl.google.com/linux/earth/deb/pool/main/g/${pkgname}-stable/${pkgname}-stable_${version}-r0_amd64.deb"
distfiles="https://dl.google.com/linux/earth/deb/pool/main/g/google-earth-pro-stable/google-earth-pro-stable_${version}-r0_amd64.deb"
checksum=86a4f43c493a872224c76dea7cf107e0b22a1da109b4d1a43e5c82e05437790b
repository=nonfree
restricted=yes
nostrip=yes

post_fetch() {
mkdir -p "$wrksrc"
cd "$wrksrc"
post_extract() {
$XBPS_FETCH_CMD https://www.google.com/intl/ALL/policies/terms/index.html>Google-Terms-of-Service.html \
https://www.google.com/help/terms_maps.html>Google-Earth-Additional-Terms-of-Service.html \
https://www.google.com/help/legalnotices_maps.html>Legal-Notices-for-Google-Earth-and-Google-Earth-APIs.html \
https://www.google.com/intl/ALL/policies/privacy/index.html>Google-Privacy-Policy.html
rm {index.html,legalnotices_maps.html,terms_maps.html}
}

do_extract() {
ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}-stable_${version}-r0_amd64.deb
bsdtar xf data.tar.xz
rm index.html legalnotices_maps.html terms_maps.html
}

do_install() {
vmkdir opt/google
vcopy opt/google/earth opt/google

vmkdir usr/bin
ln -s /opt/google/earth/pro/googleearth ${DESTDIR}/usr/bin/${pkgname}
vcopy etc /
vcopy opt /
vcopy usr /

vinstall opt/google/earth/pro/${pkgname}.desktop 644 usr/share/applications
vinstall opt/google/earth/pro/google-earth-pro.desktop 644 usr/share/applications

for i in 16 22 24 32 48 64 128 256; do
vinstall opt/google/earth/pro/product_logo_${i}.png 644 \
Expand All @@ -51,6 +43,6 @@ do_install() {
vlicense ${i}
done

sed -i '/googleearth-bin/s/^/LC_NUMERIC=en_US.UTF-8 /' \
vsed -i '/googleearth-bin/s/^/LC_NUMERIC=en_US.UTF-8 /' \
${DESTDIR}/opt/google/earth/pro/googleearth
}
Loading