Add TOML configuration files for various packages

- Introduced build configurations for graphene, gst-plugins-bad, gst-plugins-base, gstreamer, gtk4, iso-codes, jbig2dec, libepoxy, libsoup3, libtheora, libxpm, lynx, md4c, openjpeg2, poppler-data, python-attrs, python-automat, python-constantly, python-hyperlink, python-incremental, python-twisted, python-versioneer, python-zope-interface, qpdf, sdl12-compat, tinysparql, unixodbc, vmaf, xcb-util-cursor, xcb-util-image, xcb-util-renderutil, xcb-util-wm, xcb-util, xdg-utils.
- Each package includes build type, dependencies, runtime requirements, and source URLs.
- Added necessary post-install scripts and configurations where applicable.
This commit is contained in:
2026-03-29 02:51:06 -05:00
parent 45bcdeddaf
commit 2bb4d5187c
69 changed files with 2774 additions and 54 deletions
+121
View File
@@ -0,0 +1,121 @@
#!/bin/sh
set -eu
makei() {
echo "==> Running: make DESTDIR=\"$pkgdir\" install $*"
make DESTDIR="$pkgdir" install "$@"
}
mesoni() {
echo "==> Running: meson install --destdir \"$pkgdir\" $*"
meson install --destdir "$pkgdir" "$@"
}
cmakei() {
echo "==> Running: cmake --install $*"
DESTDIR="$pkgdir" cmake --install "$@"
}
starmove() {
[ "$#" -ge 1 ] || {
echo "starmove: requires at least one path pattern" >&2
return 1
}
[ "${DEPOT_OUTPUT_NAME:-}" != "" ] || {
echo "starmove: DEPOT_OUTPUT_NAME is not set" >&2
return 1
}
haul "$DEPOT_OUTPUT_NAME" "$@"
}
depot_starbuild_sync_srcdir() {
workdir=${DEPOT_STARBUILD_WORKDIR:?}
compat_root="$workdir/.depot-starbuild"
mkdir -p "$compat_root/packages"
for entry in "$workdir"/* "$workdir"/.[!.]* "$workdir"/..?*; do
[ -e "$entry" ] || [ -L "$entry" ] || continue
base=$(basename "$entry")
[ "$base" = ".depot-starbuild" ] && continue
[ "$base" = "packages" ] && continue
ln -snf "$entry" "$compat_root/$base"
done
mkdir -p "$compat_root/packages/cups/"
ln -snf "${DEPOT_PRIMARY_DESTDIR:-$DESTDIR}" "$compat_root/packages/cups/files"
mkdir -p "$compat_root/packages/libcups/"
ln -snf "$(subdestdir 'libcups')" "$compat_root/packages/libcups/files"
srcdir="$compat_root"
export srcdir
}
depot_starbuild_setup_env() {
package_name=$1
package_version='2.4.14'
pkgdir=${DESTDIR:?}
export package_name package_version pkgdir
LANG=C
LC_ALL=C
export LANG LC_ALL
depot_starbuild_sync_srcdir
}
depot_build() {
depot_starbuild_setup_env 'cups'
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--sbindir=/usr/bin \
--libdir=/usr/lib \
--with-logdir=/var/log/cups \
--with-docdir=/usr/share/cups/doc \
--with-exe-file-perm=0755 \
--with-cups-user=209 \
--with-cups-group=209 \
--with-max-log-size=0 \
--enable-pam=yes \
--enable-raw-printing \
--enable-dbus=yes \
--with-tls=gnutls \
--with-dbusdir=/usr/share/dbus-1 \
--enable-relro \
--enable-libpaper
make
}
depot_install() {
depot_starbuild_setup_env 'cups'
make BUILDROOT="${pkgdir}" install-data install-exec
rm -f "${pkgdir}"/usr/bin/cups-config
install -D -m644 ../cups.logrotate "${pkgdir}"/etc/logrotate.d/cups
install -D -m644 ../cups.pam "${pkgdir}"/etc/pam.d/cups
# fix perms on /var/spool and /etc
chmod 755 "${pkgdir}"/var/spool
chmod 755 "${pkgdir}"/etc
# remove directory from package, it will be recreated at each server start
rm -rf "${pkgdir}"/var/run
# install some more configuration files that will get filled by cupsd
touch "${pkgdir}"/etc/cups/printers.conf
touch "${pkgdir}"/etc/cups/classes.conf
touch "${pkgdir}"/etc/cups/subscriptions.conf
chgrp -R 209 "${pkgdir}"/etc/cups
# fix .desktop file
sed -i 's|^Exec=htmlview http://localhost:631/|Exec=xdg-open http://localhost:631/|g' "${pkgdir}"/usr/share/applications/cups.desktop
# compress some driver files, adopted from Fedora
find "${pkgdir}"/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f
# remove client.conf man page
rm -f "${pkgdir}"/usr/share/man/man5/client.conf.5
# comment out removed filters that are now part of cups-filters
perl -p -i -e 's:^(.*\s+bannertops\s*)$:#\1:' "$pkgdir"/usr/share/cups/mime/mime.convs
# comment out unnecessary PageLogFormat entry
sed -i -e 's:PageLogFormat:#PageLogFormat:' "$pkgdir"/etc/cups/cupsd.conf*
# no more xinetd support
rm -rf "${pkgdir}"/etc/xinetd.d
install -D -m 755 "$srcdir"/cupsd.initd $pkgdir/etc/init.d/cupsd
}
depot_install_libcups() {
depot_starbuild_setup_env 'libcups'
make BUILDROOT="${pkgdir}" install-headers install-libs
mkdir -p "${pkgdir}"/usr/bin
install -m755 "${srcdir}"/cups/cups-config "${pkgdir}"/usr/bin/cups-config
}
+10
View File
@@ -0,0 +1,10 @@
diff -up cups-1.5b1/config-scripts/cups-ssl.m4.no-export-ssllibs cups-1.5b1/config-scripts/cups-tls.m4
--- cups-1.6.2/config-scripts/cups-tls.m4.no-export-ssllibs 2011-05-11 02:52:08.000000000 +0200
+++ cups-1.6.2/config-scripts/cups-tls.m4 2011-05-23 17:47:27.000000000 +0200
@@ -107,5 +107,5 @@
AC_SUBST([TLSFLAGS])
AC_SUBST([TLSLIBS])
-EXPORT_TLSLIBS="$TLSLIBS"
+EXPORT_TLSLIBS=""
AC_SUBST([EXPORT_TLSLIBS])
+68
View File
@@ -0,0 +1,68 @@
diff -ru a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4
--- a/config-scripts/cups-compiler.m4 2020-04-27 14:04:29.000000000 -0400
+++ b/config-scripts/cups-compiler.m4 2021-08-06 20:53:29.316010169 -0400
@@ -11,9 +11,6 @@
dnl Clear the debugging and non-shared library options unless the user asks
dnl for them...
-INSTALL_STRIP=""
-AC_SUBST(INSTALL_STRIP)
-
AC_ARG_WITH([optim], AS_HELP_STRING([--with-optim], [set optimization flags]), [
OPTIM="$withval"
], [
@@ -31,7 +28,6 @@
AS_IF([test x$enable_debug = xyes -a "x$OPTIM" = x], [
OPTIM="-g"
], [
- INSTALL_STRIP="-s"
])
dnl Debug printfs can slow things down, so provide a separate option for that
diff -ru a/configure b/configure
--- a/configure 2020-04-27 14:04:29.000000000 -0400
+++ b/configure 2021-08-06 20:54:01.585892266 -0400
@@ -726,7 +726,6 @@
ARCHFLAGS
UNITTESTS
OPTIM
-INSTALL_STRIP
LIBTOOL_INSTALL
LIBTOOL_CXX
LIBTOOL_CC
@@ -7902,7 +7901,6 @@
-INSTALL_STRIP=""
@@ -7956,10 +7954,6 @@
OPTIM="-g"
-else $as_nop
-
- INSTALL_STRIP="-s"
-
fi
if test x$enable_debug_printfs = xyes
diff -ru a/Makedefs.in b/Makedefs.in
--- a/Makedefs.in 2020-04-27 14:04:29.000000000 -0400
+++ b/Makedefs.in 2021-08-06 20:53:42.565961754 -0400
@@ -46,12 +46,12 @@
# Installation programs...
#
-INSTALL_BIN = @LIBTOOL_INSTALL@ $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@
+INSTALL_BIN = @LIBTOOL_INSTALL@ $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@
INSTALL_COMPDATA = $(INSTALL) -c -m 444 @INSTALL_GZIP@
INSTALL_CONFIG = $(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@
INSTALL_DATA = $(INSTALL) -c -m 444
INSTALL_DIR = $(INSTALL) -d
-INSTALL_LIB = @LIBTOOL_INSTALL@ $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@
+INSTALL_LIB = @LIBTOOL_INSTALL@ $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@
INSTALL_MAN = $(INSTALL) -c -m 444
INSTALL_SCRIPT = $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@
+5
View File
@@ -0,0 +1,5 @@
/var/log/cups/*_log {
missingok
notifempty
sharedscripts
}
+3
View File
@@ -0,0 +1,3 @@
auth required pam_unix.so
account required pam_unix.so
session required pam_unix.so
+75
View File
@@ -0,0 +1,75 @@
[build]
type = "custom"
[build.flags]
keep = [
"etc/cups/cupsd.conf",
"etc/cups/snmp.conf",
"etc/cups/printers.conf",
"etc/cups/classes.conf",
"etc/cups/cups-files.conf",
"etc/cups/subscriptions.conf",
"etc/logrotate.d/cups",
"etc/pam.d/cups",
]
[dependencies]
build = [
"acl",
"avahi",
"gnutls",
"libpaper",
"libusb",
"pam",
"git",
]
runtime = [ "acl", "avahi", "dbus", "glibc", "gnutls", "hicolor-icon-theme", "libcups", "libunwind", "libpaper", "libcxx", "pam" ]
[[manual_sources]]
file = "cups.pam"
[[manual_sources]]
file = "cupsd.initd"
[[manual_sources]]
file = "preinstall.sh"
[[manual_sources]]
file = "default-config-no-gssapi.patch"
[[manual_sources]]
file = "cups-nostrip.patch"
[[manual_sources]]
file = "cups-no-export-ssllibs.patch"
[[manual_sources]]
file = "cups.logrotate"
[package]
description = "OpenPrinting CUPS - daemon package"
homepage = "https://github.com/OpenPrinting/cups.git"
license = "Apache-2.0 WITH LLVM-exception AND BSD-3-Clause AND Zlib AND BSD-2-Clause"
name = "cups"
version = "2.4.16"
[package_dependencies.libcups]
runtime = [
"avahi",
"glibc",
"gnutls",
"sh",
"zlib-ng",
]
[[packages]]
description = "OpenPrinting CUPS - client libraries and headers"
homepage = "https://github.com/OpenPrinting/cups.git"
license = "Apache-2.0 WITH LLVM-exception AND BSD-3-Clause AND Zlib AND BSD-2-Clause"
name = "libcups"
version = "2.4.16"
[[source]]
extract_dir = "cups"
url = "https://github.com/OpenPrinting/cups.git#v$version"
patches = [ "cups-no-export-ssllibs.patch", "default-config-no-gssapi.patch", "cups-nostrip.patch" ]
+44
View File
@@ -0,0 +1,44 @@
#!/sbin/openrc-run
name="CUPS"
extra_commands="checkconfig"
extra_started_commands="reload"
description_checkconfig="Test the configuration file"
description_reload="Reload"
: ${cfgfile:="/etc/cups/cupsd.conf"}
command="/usr/sbin/cupsd"
command_args="-f -c $cfgfile"
command_background="yes"
pidfile="/run/cups/$RC_SVCNAME.pid"
depend() {
use net
before nfs
need dbus
after logger
}
checkconfig() {
$command $command_args -t >/dev/null 2>&1 \
|| $command $command_args -t
}
start_pre() {
checkconfig || return 1
checkpath -q -d -m 0775 -o root:lp /var/cache/cups
checkpath -q -d -m 0775 -o root:lp /var/cache/cups/rss
checkpath -q -d -m 0755 -o root:lp /run/cups
checkpath -q -d -m 0511 -o lp:lpadmin /run/cups/certs
}
reload() {
ebegin "Reloading $name"
start-stop-daemon --signal HUP --pidfile "$pidfile"
eend $?
}
+29
View File
@@ -0,0 +1,29 @@
Upstream: Not applicable (local configuration)
Reason: Sets config defaults for Alpine
--- a/conf/cupsd.conf.in
+++ b/conf/cupsd.conf.in
@@ -154,12 +154,12 @@
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
- AuthType Negotiate
+ AuthType Default
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
- AuthType Negotiate
+ AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
@@ -180,7 +180,7 @@
# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
- AuthType Negotiate
+ AuthType Default
Require user @OWNER @CUPS_DEFAULT_PRINTOPERATOR_AUTH@
Order deny,allow
</Limit>
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
addgroup -S lpadmin 2>/dev/null
addgroup -S -g 7 lp 2>/dev/null
adduser -S -G lp -g lp -u 4 lp 2>/dev/null
addgroup lp lp 2>/dev/null
exit 0