commit d93b70af34d7b2772a87f90ee10be420fabdbef3 Author: EnumDev Date: Sat Mar 14 13:26:47 2026 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9d96df7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Ignore BPM archives and signatures +*.bpm +*.bpm.sig diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..e9787f7 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +URL="https://www.samba.org/ftp/linux-cifs/cifs-utils" + +# Get version number from FTP server +VERSION=$(curl -s -L "$URL" | grep -o -E 'cifs-utils-[0-9]{1,}\.[0-9]{1,}(\.[0-9]{1,})?.tar.bz2' | cut -d '-' -f3 | sort -V | tail -n1) + +# Remove '.tar.gz' suffix from VERSION variable +VERSION=${VERSION//.tar.bz2/} + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..32ce320 --- /dev/null +++ b/pkg.info @@ -0,0 +1,27 @@ +name: cifs-utils +description: CIFS filesystem user-space tools +version: "7.5" +revision: 1 +url: https://wiki.samba.org/index.php/LinuxCIFS_utils +license: GPL3-or-later +maintainers: + - enumdev@enumerated.dev +architecture: any +type: source +depends: + - keyutils + - krb5 + - libcap + - libwbclient + - pam + - talloc +optional_depends: + - python3:For smb2-quota and smbinfo scripts +make_depends: + - bzip2 + - python-docutils +downloads: + - url: https://www.samba.org/ftp/linux-cifs/cifs-utils/cifs-utils-${BPM_PKG_VERSION}.tar.bz2 + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 7face85e3d2d5eb5e7adbd181adee6759097f135b10d6fb30be8e070af7e7054 diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..8ce8bc0 --- /dev/null +++ b/source.sh @@ -0,0 +1,40 @@ +# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +# The prepare function is executed in the root of the temp directory +# This function is used for putting downloaded files to the correct location or applying patches +prepare() { + cd "$BPM_SOURCE" + autoreconf -fi +} + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + ./configure --prefix=/usr --disable-systemd + 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 + + # Move /sbin content to /usr/sbin + mv "$BPM_OUTPUT"/sbin/* -t "$BPM_OUTPUT"/usr/sbin + rmdir "$BPM_OUTPUT"/sbin + + # Install additional files + install -Dm644 contrib/request-key.d/cifs.{idmap,spnego}.conf -t "$BPM_OUTPUT"/etc/request-key.d + + # Fix permissions + chmod +s "$BPM_OUTPUT"/usr/sbin/mount.cifs + + # Fix idmap-plugin + install -d "$BPM_OUTPUT"/etc/cifs-utils + ln -s /usr/lib/cifs-utils/idmapwb.so "$BPM_OUTPUT"/etc/cifs-utils/idmap-plugin + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/cifs-utils/COPYING +}