Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1462b9655 | ||
|
|
b8316f8990 |
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Github repository
|
||||
REPO="OpenPrinting/cups"
|
||||
|
||||
# Get tag name using Github Rest API
|
||||
TAG_NAME=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name')
|
||||
|
||||
# Trim 'v' character in TAG_NAME variable
|
||||
VERSION=$(echo "$TAG_NAME" | tr -d 'v')
|
||||
|
||||
echo "$VERSION"
|
||||
@@ -1,11 +1,16 @@
|
||||
name: cups
|
||||
description: An open-source printing system
|
||||
version: 2.4.7
|
||||
revision: 3
|
||||
version: 2.4.12
|
||||
url: https://openprinting.github.io/cups/
|
||||
license: Apache2 with LLVM-exception and BSD-3-Clause and Zlib and BSD-2-Clause
|
||||
architecture: any
|
||||
depends: ["acl", "dbus", "gcc-libs", "glibc", "gnutls", "hicolor-icon-theme", "sysusers", "pam", "udev"]
|
||||
optional_depends: ["xdg-utils"]
|
||||
optional_depends: ["libusb","xdg-utils"]
|
||||
make_depends: ["acl","dbus","gnutls","libusb","pam","udev"]
|
||||
keep: ["etc/cups/client.conf"]
|
||||
type: source
|
||||
split_packages:
|
||||
- name: cups
|
||||
depends: ["acl", "dbus", "gcc-libs", "glibc", "gnutls", "hicolor-icon-theme", "libcups", "sysusers", "pam", "udev"]
|
||||
- name: libcups
|
||||
description: Library and header files for the CUPS printing system
|
||||
depends: ["glibc","gnutls","zlib"]
|
||||
|
||||
@@ -15,23 +15,45 @@ prepare() {
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
sed -i 's#@CUPS_HTMLVIEW@#firefox#' desktop/cups.desktop.in
|
||||
sed -i 's#@CUPS_HTMLVIEW@#xdg-open#' desktop/cups.desktop.in
|
||||
|
||||
./configure --libdir=/usr/lib --localstatedir=/var --disable-systemd --with-rundir=/run/cups --with-system-groups=lpadmin
|
||||
./configure --libdir=/usr/lib --localstatedir=/var --disable-systemd --with-rundir=/run/cups
|
||||
make
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
make DESTDIR="$BPM_OUTPUT" install
|
||||
|
||||
package_cups() {
|
||||
make DESTDIR="$BPM_OUTPUT" install-data install-exec
|
||||
|
||||
# Remove program that is installed by libcups
|
||||
rm "$BPM_OUTPUT"/usr/bin/cups-config
|
||||
|
||||
# Remove SysV files
|
||||
rm -rf "$BPM_OUTPUT"/etc/rd*.d
|
||||
rm -rf "$BPM_OUTPUT"/etc/init.d
|
||||
|
||||
# Create default cups client config
|
||||
install -d "$BPM_OUTPUT"/etc/cups
|
||||
echo "ServerName /run/cups/cups.sock" > "$BPM_OUTPUT"/etc/cups/client.conf
|
||||
|
||||
# Install sysusesrs
|
||||
install -Dm644 "$BPM_WORKDIR"/sysusers "$BPM_OUTPUT"/usr/lib/sysusers.d/cups.conf
|
||||
|
||||
|
||||
# Install ESVM service
|
||||
install -Dm644 "$BPM_WORKDIR"/cupsd.esv "$BPM_OUTPUT"/etc/esvm/services/cupsd.esv
|
||||
|
||||
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/cups/LICENSE
|
||||
# Install package license
|
||||
install -d "$BPM_OUTPUT"/usr/share/licenses/
|
||||
ln -sf libcups "$BPM_OUTPUT"/usr/share/licenses/cups
|
||||
}
|
||||
|
||||
package_libcups() {
|
||||
make DESTDIR="$BPM_OUTPUT" install-libs install-headers
|
||||
|
||||
# Install program required by other software to locate the libraries
|
||||
install -Dm755 "$BPM_SOURCE"/cups-config "$BPM_OUTPUT"/usr/bin/cups-config
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/{LICENSE,NOTICE} -t "$BPM_OUTPUT"/usr/share/licenses/libcups/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user