Compare commits
33
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
548efe62e9 | ||
|
|
8af1aeda05 | ||
|
|
69a82e2094 | ||
|
|
06021b4858 | ||
|
|
8c6568e85d | ||
|
|
439f7c82e2 | ||
|
|
89fcdf6f0b | ||
|
|
2859a996d6 | ||
|
|
9624359a7e | ||
|
|
2f9e66bf4a | ||
|
|
b80ad9b419 | ||
|
|
198833f154 | ||
|
|
92d86246cd | ||
|
|
12b92bd3c2 | ||
|
|
a44ac86eb3 | ||
|
|
bb48ec4bbe | ||
|
|
e77fee9fc3 | ||
|
|
4dfd5dcbc4 | ||
|
|
5093017838 | ||
|
|
ed20a37cc2 | ||
|
|
7706d5b7ad | ||
|
|
4db704467a | ||
|
|
ac931d97ed | ||
|
|
2b533c9298 | ||
|
|
fca06f50fe | ||
|
|
48b5c674b3 | ||
|
|
90917d95b7 | ||
|
|
924b3cafff | ||
|
|
01f47e6475 | ||
|
|
e9e3df0695 | ||
|
|
eb7fe5b277 | ||
|
|
9aa85bb01a | ||
|
|
a41bdc263e |
No files matched your search
@@ -0,0 +1,36 @@
|
|||||||
|
name: Validate Package Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
resolve-dependencies:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: archlinux:base-devel
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install aurutils dependencies
|
||||||
|
shell: bash
|
||||||
|
run: pacman -Syu --noconfirm git sudo
|
||||||
|
|
||||||
|
- name: Create and become build user
|
||||||
|
run: |
|
||||||
|
useradd builduser -m # Create the builduser
|
||||||
|
passwd -d builduser # Delete the buildusers password
|
||||||
|
printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers # Allow the builduser passwordless sudo
|
||||||
|
|
||||||
|
# This is only temporary, for bootstrapping, until this repo itself contains aurutils and can be installed via the repo
|
||||||
|
- name: Install aurutils
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
su - builduser -c '
|
||||||
|
set -e
|
||||||
|
cd
|
||||||
|
git clone https://aur.archlinux.org/aurutils.git
|
||||||
|
cd aurutils
|
||||||
|
makepkg -si --noconfirm
|
||||||
|
'
|
||||||
+3
-3
@@ -2,9 +2,6 @@ chroot
|
|||||||
*~
|
*~
|
||||||
*.kate-swp
|
*.kate-swp
|
||||||
pkg
|
pkg
|
||||||
src/**/*.gz
|
|
||||||
src/**/*.xz
|
|
||||||
src/**/*.log
|
|
||||||
aur
|
aur
|
||||||
broke
|
broke
|
||||||
.SRCINFO
|
.SRCINFO
|
||||||
@@ -13,3 +10,6 @@ build_single_nofail.sh
|
|||||||
ppa.cfg
|
ppa.cfg
|
||||||
|
|
||||||
src/doom-wads/*.WAD
|
src/doom-wads/*.WAD
|
||||||
|
src/**/src/
|
||||||
|
*.tar.gz
|
||||||
|
*.tar.zst
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# this is meant to be put in /usr/bin and allowed to use for for a user
|
|
||||||
# cp /home/ppa/arch-ppa/arch-chroot-helper /usr/bin/; chown root.root /usr/bin/arch-chroot-helper; chmod 555 /usr/bin/arch-chroot-helper
|
|
||||||
# then add this using visudo:
|
|
||||||
# ppa ALL= NOPASSWD: /usr/bin/arch-chroot-helper
|
|
||||||
|
|
||||||
ccm_root='/scratch/.chroot64'
|
|
||||||
|
|
||||||
prepare() {
|
|
||||||
if [ -d "${ccm_root}/root" ]; then
|
|
||||||
# this exists, so just update it
|
|
||||||
arch-nspawn "${ccm_root}/root" pacman -Syu --noconfirm
|
|
||||||
#yes | arch-nspawn "${ccm_root}/root" pacman -Scc
|
|
||||||
else
|
|
||||||
# does not exist, create it...
|
|
||||||
mkdir -p "${ccm_root}"
|
|
||||||
mkarchroot -C /etc/pacman.conf -M /etc/makepkg.conf "${ccm_root}/root" base-devel
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
nuke() {
|
|
||||||
rm -rf "${ccm_root}"
|
|
||||||
}
|
|
||||||
|
|
||||||
make() {
|
|
||||||
set -e
|
|
||||||
prepare
|
|
||||||
makechrootpkg -c -u -r "${ccm_root}"
|
|
||||||
}
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
prepare)
|
|
||||||
prepare
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
nuke)
|
|
||||||
nuke
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
make)
|
|
||||||
make
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Must specify command: prepare, nuke, make"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
@@ -1,304 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
basedir=$(cd $(dirname $0); pwd)
|
|
||||||
chroot=$basedir/chroot
|
|
||||||
|
|
||||||
if [ `whoami` == 'root' ]; then
|
|
||||||
echo "Must not be run as root."
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
exe() { echo "\$ $@" ; "$@" ; }
|
|
||||||
|
|
||||||
create_chroot() {
|
|
||||||
(
|
|
||||||
set -e
|
|
||||||
if [ ! -d $chroot ]; then
|
|
||||||
echo "## Creating arch chroot ..."
|
|
||||||
exe mkdir $chroot
|
|
||||||
exe mkarchroot $chroot/root base-devel
|
|
||||||
# install cower:
|
|
||||||
gpg --recv-keys --keyserver hkp://pgp.mit.edu 1EB2638FF56C0C53
|
|
||||||
TMP_BUILD=`mktemp -d`
|
|
||||||
exe cd $TMP_BUILD
|
|
||||||
curl https://aur.archlinux.org/cgit/aur.git/snapshot/cower.tar.gz | tar xz
|
|
||||||
exe cd cower
|
|
||||||
exe makechrootpkg -r $chroot -l root -- -i
|
|
||||||
exe rm -rf $TMP_BUILD
|
|
||||||
echo "## Root chroot build complete."
|
|
||||||
fi
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
install_system_deps() {
|
|
||||||
(
|
|
||||||
set -e
|
|
||||||
pkg_dep() {
|
|
||||||
if !(pacman -Q $1 > /dev/null 2>&1); then
|
|
||||||
echo "Installing $1..."
|
|
||||||
exe sudo pacman -S --noconfirm $1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
pkg_dep devtools
|
|
||||||
pkg_dep git
|
|
||||||
pkg_dep findutils
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
package_build() {
|
|
||||||
# Build a package in a container. $1=container $2=package
|
|
||||||
# PKGBUILD must already exist in src/
|
|
||||||
# If package has dependencies we also maintain in src/, recursively build those first.
|
|
||||||
(
|
|
||||||
set -e
|
|
||||||
if [ "$#" -ne 2 ]; then
|
|
||||||
echo "package_build takes two args: repo_name and package_name"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
repo_name=$1
|
|
||||||
package_name=$2
|
|
||||||
setup
|
|
||||||
pkgdir=$basedir/src/$package_name
|
|
||||||
if [ ! -d $pkgdir ]; then
|
|
||||||
echo "Package $package_name not found in $pkgdir"
|
|
||||||
echo "Try running: package_add $package_name"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
if [ ! -f $pkgdir/PKGBUILD ]; then
|
|
||||||
echo "Cannot find PKGBUILD in $pkgdir"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
if (arch-nspawn $chroot/$repo_name pacman -Q $package_name > /dev/null 2>&1); then
|
|
||||||
echo "Package $package_name already built"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
# Find and build dependencies:
|
|
||||||
find_deps $package_name | while read dep; do
|
|
||||||
# Build the dep if we haven't already yet:
|
|
||||||
if !(arch-nspawn $chroot/$repo_name pacman -Q $dep > /dev/null 2>&1); then
|
|
||||||
package_build $repo_name $dep
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
# Build package:
|
|
||||||
cd $pkgdir
|
|
||||||
rm -f *.pkg.tar.xz
|
|
||||||
mkdir -p $basedir/$repo_name
|
|
||||||
exe makechrootpkg -r $chroot -l $repo_name -- -i
|
|
||||||
exe mv *.pkg.tar.xz $basedir/$repo_name
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
sign_packages() {
|
|
||||||
if [ "$#" -lt 1 ]; then
|
|
||||||
echo "sign_packages requires specifying the list of packages to sign"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
(
|
|
||||||
set -e
|
|
||||||
cd $(dirname $1)
|
|
||||||
for pkg in "$@"; do
|
|
||||||
gpg -v "${pkg}.sig" 2>/dev/null || (rm -f "${pkg}.sig"; gpg -u 'ECB9B8CBAAC68C03!' --detach-sign --use-agent "$pkg")
|
|
||||||
done
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
find_deps() {
|
|
||||||
# Inspect package srcinfo and pull out the dependencies that we maintain in src
|
|
||||||
(
|
|
||||||
set -e
|
|
||||||
setup
|
|
||||||
cat $basedir/src/$1/.SRCINFO | sed -nr 's/^\W*depends = ([-a-zA-Z0-9]+).*$/\1/p' | while read dep; do
|
|
||||||
if [ -d $basedir/src/$dep ]; then
|
|
||||||
echo $dep
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
add() {
|
|
||||||
# Add packages and their AUR dependencies to src
|
|
||||||
(
|
|
||||||
set -e
|
|
||||||
if [ "$#" -lt 1 ]; then
|
|
||||||
echo "Must specify package(s) to add"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
setup
|
|
||||||
if [ ! -d $basedir/src ]; then
|
|
||||||
mkdir $basedir/src
|
|
||||||
fi
|
|
||||||
for pkg in "$@"; do
|
|
||||||
arch-nspawn $chroot/root --bind=$basedir/src:/src cower -q -t /src -f -d -d $pkg
|
|
||||||
done
|
|
||||||
sudo chown $USER -R $basedir/src
|
|
||||||
echo "## All requested packages added"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
update() {
|
|
||||||
# Update a package and it's dependencies from the AUR
|
|
||||||
(
|
|
||||||
#set -e # breaks updating all if one fails, ignore errors
|
|
||||||
if [ "$#" -eq 0 ]; then
|
|
||||||
cd $basedir/src
|
|
||||||
update *
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
for pkg in "$@"; do
|
|
||||||
if [ ! -d $basedir/src/$pkg ]; then
|
|
||||||
echo "No package called $pkg found in src"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
for pkg in "$@"; do
|
|
||||||
check_in_git() {
|
|
||||||
(
|
|
||||||
cd $basedir
|
|
||||||
if (! git ls-files $1 --error-unmatch >/dev/null 2>&1); then
|
|
||||||
echo "$1 is not under git control yet. Add and commit it before updating."
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
)
|
|
||||||
}
|
|
||||||
check_in_git $basedir/src
|
|
||||||
check_in_git $basedir/src/$pkg
|
|
||||||
find_deps $pkg | while read dep; do
|
|
||||||
check_in_git $basedir/src/$dep
|
|
||||||
done
|
|
||||||
# Check if package has uncommited changes
|
|
||||||
if [ $(git -C $basedir diff HEAD $basedir/src/$pkg | wc -l) -gt 0 ]; then
|
|
||||||
echo "warning: Package $pkg has uncommited changes. Commit or discard those changes first."
|
|
||||||
#return 1
|
|
||||||
fi
|
|
||||||
# Use a temporary dir to download all PKGBUILDS atomically
|
|
||||||
[ -z "$tmp_dl" ] && tmp_dl=`mktemp -d`
|
|
||||||
cd $tmp_dl
|
|
||||||
arch-nspawn $chroot/root --bind=$tmp_dl:/src cower -q -t /src -d -d $pkg >/dev/null 2>&1
|
|
||||||
cp -a * $basedir/src
|
|
||||||
done
|
|
||||||
git -C $basedir diff --name-status $basedir/src/
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
list() {
|
|
||||||
if [ "$#" -ne 1 ]; then
|
|
||||||
echo "Must specify repository name to list"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
setup
|
|
||||||
arch-nspawn $chroot/$1 pacman -Qm
|
|
||||||
}
|
|
||||||
|
|
||||||
setup() {
|
|
||||||
mkdir -p $basedir/src
|
|
||||||
install_system_deps
|
|
||||||
create_chroot
|
|
||||||
}
|
|
||||||
|
|
||||||
clean() {
|
|
||||||
(
|
|
||||||
set -e
|
|
||||||
if [ "$#" -lt 1 ]; then
|
|
||||||
echo "Must specify repository names to clean"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
for repo in "$@"; do
|
|
||||||
# Clean repository and chroot
|
|
||||||
if [ -d $basedir/chroot/$repo ]; then
|
|
||||||
# Test if chroot uses BTRFS and remove using btrfs subvolume delete
|
|
||||||
if [ `stat --format=%i $basedir/chroot/$repo` -eq 256 ] && [ `stat -f --format=%T $basedir/chroot/$repo` ] ; then
|
|
||||||
exe sudo btrfs subvolume delete $basedir/chroot/$repo
|
|
||||||
exe sudo rm $basedir/chroot/$repo.lock
|
|
||||||
# Otherwise delete using rm
|
|
||||||
else
|
|
||||||
exe sudo rm -rf $basedir/chroot/$repo $basedir/chroot/$repo.lock
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [ -d $basedir/$repo ]; then
|
|
||||||
exe rm -rf $basedir/$repo
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
|
||||||
(
|
|
||||||
set -e
|
|
||||||
if [ "$#" -lt 1 ]; then
|
|
||||||
echo "Must specify repository name to build (and optional package list to include)"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
setup
|
|
||||||
repo_name=$1
|
|
||||||
mkdir -p $basedir/$repo_name
|
|
||||||
shift
|
|
||||||
if [ "$#" -gt 0 ]; then
|
|
||||||
# Build only requested packages
|
|
||||||
for pkg in "$@"; do
|
|
||||||
package_build $repo_name $pkg
|
|
||||||
done
|
|
||||||
echo "## All requested packages built"
|
|
||||||
else
|
|
||||||
# Build all packages:
|
|
||||||
cd $basedir/src
|
|
||||||
find -type d | sed 's/\.\///' | tail -n +2 | while read pkg; do
|
|
||||||
package_build $repo_name $pkg
|
|
||||||
done
|
|
||||||
echo "## All packages built"
|
|
||||||
fi
|
|
||||||
echo "## Updating repository database"
|
|
||||||
cd $basedir/$repo_name
|
|
||||||
if [ `ls *.pkg.tar.xz 2> /dev/null | wc -l` -lt 1 ]; then
|
|
||||||
echo "No packages found in $basedir/$repo_name"
|
|
||||||
return 1;
|
|
||||||
fi
|
|
||||||
sign_packages *.pkg.tar.xz
|
|
||||||
repose -f -z $repo_name
|
|
||||||
sign_packages $repo_name.db $repo_name.files
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
rebuild() {
|
|
||||||
(
|
|
||||||
set -e
|
|
||||||
if [ "$#" -lt 1 ]; then
|
|
||||||
echo "Must specify repository name to build (and optional package list to include)"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
setup
|
|
||||||
repo_name=$1
|
|
||||||
mkdir -p $basedir/$repo_name
|
|
||||||
shift
|
|
||||||
arch-nspawn $chroot/$repo_name pacman -Rscn --noconfirm "$@" || true
|
|
||||||
build "$repo_name" "$@"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
build_changed() {
|
|
||||||
(
|
|
||||||
# git diff-tree --no-commit-id --name-status -r "$commit" | grep -v ^D | grep PKGBUILD$ | sed -e 's@/PKGBUILD$@@' -e 's@.*/@@' | xargs -n1 arch-nspawn chroot/aur pacman -Rscn --noconfirm
|
|
||||||
# git diff-tree --no-commit-id --name-status -r "$commit" | grep -v ^D | grep PKGBUILD$ | sed -e 's@/PKGBUILD$@@' -e 's@.*/@@' | xargs -n1 ./arch-ppa build aur
|
|
||||||
set -e
|
|
||||||
if [ "$#" -lt 1 ]; then
|
|
||||||
echo "Must specify repository name to build (and optional package list to include)"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
setup
|
|
||||||
repo_name=$1
|
|
||||||
mkdir -p $basedir/$repo_name
|
|
||||||
shift
|
|
||||||
commit="$1"
|
|
||||||
[ "$commit" == "" ] && commit=HEAD
|
|
||||||
changed_pkgbuilds="$(git diff-tree --no-commit-id --name-status -r "$commit" | grep -v ^D | grep PKGBUILD$ | sed -e 's@/PKGBUILD$@@' -e 's@.*/@@' | tr '\n' ' ')"
|
|
||||||
# remove them
|
|
||||||
arch-nspawn $chroot/$repo_name pacman -Rscn --noconfirm $changed_pkgbuilds || true
|
|
||||||
build "$repo_name" $changed_pkgbuilds
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$#" -gt 0 ]; then
|
|
||||||
$*
|
|
||||||
else
|
|
||||||
echo "Must specify a command, eg: add, build, list, clean"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
libgcj17-bin
|
|
||||||
emulationstation-autoscraper
|
|
||||||
|
|
||||||
pdftk-bin
|
|
||||||
|
|
||||||
cloog mingw-w64-gcc-base mingw-w64-crt mingw-w64-winpthreads zpaq zelda-roth wireguard-module-arch truecraft-git rusty-keys-git rusty-keys pdftk-bin openconnect-git mingw-w64-gcc kodi-standalone-socket-activation filebot emulationstation-themes
|
|
||||||
|
|
||||||
zelda-roth wireguard-module-arch truecraft-git rusty-keys-git rusty-keys openconnect-git filebot emulationstation-themes
|
|
||||||
|
|
||||||
zelda-roth wireguard-module-arch truecraft-git rusty-keys-git rusty-keys filebot emulationstation-themes
|
|
||||||
|
|
||||||
@@ -1,205 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# requires:
|
|
||||||
# https://aur.archlinux.org/packages/clean-chroot-manager
|
|
||||||
# https://aur.archlinux.org/packages/aurutils
|
|
||||||
|
|
||||||
basedir="$(pwd)"
|
|
||||||
src_dir="${basedir}/src"
|
|
||||||
repo_name=aur
|
|
||||||
pkg_dir="${basedir}/$repo_name"
|
|
||||||
aurweb='https://aur.archlinux.org'
|
|
||||||
|
|
||||||
if [ `whoami` == 'root' ]; then
|
|
||||||
echo "Must not be run as root."
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -e ppa.cfg ] && source ppa.cfg
|
|
||||||
|
|
||||||
clone_update_aur() {
|
|
||||||
declare -r startdir=$PWD
|
|
||||||
|
|
||||||
while IFS= read -r; do
|
|
||||||
if [[ -d $REPLY ]]
|
|
||||||
then
|
|
||||||
|
|
||||||
if [[ ! -d $REPLY/.git-nosub ]]
|
|
||||||
then
|
|
||||||
rm -rf tmp
|
|
||||||
git clone "$aurweb/$REPLY".git tmp
|
|
||||||
mv tmp/.git "$REPLY"/.git-nosub
|
|
||||||
rm -rf tmp
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$REPLY"
|
|
||||||
mv .git-nosub .git
|
|
||||||
|
|
||||||
git fetch -v # returns 0 even if nothing was fetched
|
|
||||||
git reset --hard HEAD
|
|
||||||
git merge
|
|
||||||
|
|
||||||
cd "$startdir"
|
|
||||||
else
|
|
||||||
git clone "$aurweb/$REPLY".git
|
|
||||||
fi
|
|
||||||
# .git folders make it a git submodule, we don't want that, need to gitignore .git-nosub
|
|
||||||
mv "$REPLY"/.git "$REPLY"/.git-nosub
|
|
||||||
# we don't ever want to track these
|
|
||||||
rm -f "$REPLY"/.SRCINFO
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
add() {
|
|
||||||
cd "$src_dir"
|
|
||||||
aurchain "$@" | clone_update_aur
|
|
||||||
}
|
|
||||||
|
|
||||||
update() {
|
|
||||||
cd "$src_dir"
|
|
||||||
if [ "$#" -gt 0 ]; then
|
|
||||||
aurchain "$@" | clone_update_aur
|
|
||||||
else
|
|
||||||
aurchain * | clone_update_aur
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
sign_packages() {
|
|
||||||
cd "$pkg_dir"
|
|
||||||
for pkg in "$@"; do
|
|
||||||
gpg -v "${pkg}.sig" 2>/dev/null || (rm -f "${pkg}.sig"; gpg --detach-sign --use-agent "$pkg")
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
|
||||||
cd "$src_dir"
|
|
||||||
if [ "$#" -gt 0 ]; then
|
|
||||||
failed=''
|
|
||||||
# create .SRCINFO, so aurqueue can use it next
|
|
||||||
for dir in "$@"
|
|
||||||
do
|
|
||||||
cd $dir
|
|
||||||
makepkg --printsrcinfo > .SRCINFO
|
|
||||||
cd "$src_dir"
|
|
||||||
done
|
|
||||||
for dir in $(aurqueue "$@")
|
|
||||||
do
|
|
||||||
cd $dir
|
|
||||||
# delete any existing packages
|
|
||||||
grep '^pkgname = ' .SRCINFO | sed 's/^pkgname = //' | xargs -I {} sh -c 'rm -f {}*pkg.tar*'
|
|
||||||
sudo arch-chroot-helper make
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
# failed, append to failed string
|
|
||||||
failed="$failed $dir"
|
|
||||||
else
|
|
||||||
#list_of_packages="$(grep '^pkgname = ' .SRCINFO | sed 's/^pkgname = //' | sort -u | tr '\n' ' ')"
|
|
||||||
list_of_package_files="$(grep '^pkgname = ' .SRCINFO | sed 's/^pkgname = //' | xargs -I {} sh -c 'ls {}*pkg.tar*' 2>/dev/null | sort -u | tr '\n' ' ')"
|
|
||||||
mv $list_of_package_files "$pkg_dir"
|
|
||||||
cd "$pkg_dir"
|
|
||||||
sign_packages $list_of_package_files
|
|
||||||
# repose appears to work the same with both $list_of_packages and $list_of_package_files
|
|
||||||
repose -f -z $repo_name $list_of_package_files
|
|
||||||
sign_packages $repo_name.db $repo_name.files
|
|
||||||
fi
|
|
||||||
cd "$src_dir"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$failed" == "" ]
|
|
||||||
then
|
|
||||||
# success!, nuke the chroot
|
|
||||||
echo sudo arch-chroot-helper nuke
|
|
||||||
else
|
|
||||||
# some failures
|
|
||||||
echo "failed packages:$failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
build *
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
rebuild_db() {
|
|
||||||
cd "$pkg_dir"
|
|
||||||
repose -v -f -z $repo_name
|
|
||||||
sign_packages $repo_name.db $repo_name.files
|
|
||||||
}
|
|
||||||
|
|
||||||
echo_deps() {
|
|
||||||
cd "$src_dir"
|
|
||||||
aurchain "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
build_deps() {
|
|
||||||
cd "$src_dir"
|
|
||||||
if [ "$#" -gt 0 ]; then
|
|
||||||
build $(aurchain "$@")
|
|
||||||
else
|
|
||||||
# regular build? if we are building all no use looking up deps...
|
|
||||||
build
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
build_changed() {
|
|
||||||
commit="$1"
|
|
||||||
[ "$commit" == "" ] && commit=HEAD
|
|
||||||
build $(git diff-tree --no-commit-id --name-status -r "$commit" | grep -v ^D | grep PKGBUILD$ | sed -e 's@/PKGBUILD$@@' -e 's@.*/@@' | tr '\n' ' ')
|
|
||||||
}
|
|
||||||
|
|
||||||
build_changed_deps() {
|
|
||||||
commit="$1"
|
|
||||||
[ "$commit" == "" ] && commit=HEAD
|
|
||||||
build_deps $(git diff-tree --no-commit-id --name-status -r "$commit" | grep -v ^D | grep PKGBUILD$ | sed -e 's@/PKGBUILD$@@' -e 's@.*/@@' | tr '\n' ' ')
|
|
||||||
}
|
|
||||||
|
|
||||||
echo_changed() {
|
|
||||||
commit="$1"
|
|
||||||
[ "$commit" == "" ] && commit=HEAD
|
|
||||||
git diff-tree --no-commit-id --name-status -r "$commit" | grep -v ^D | grep PKGBUILD$ | sed -e 's@/PKGBUILD$@@' -e 's@.*/@@' | tr '\n' ' '
|
|
||||||
}
|
|
||||||
|
|
||||||
list_official_packages() {
|
|
||||||
cd "$src_dir"
|
|
||||||
ls | xargs -n1 -I {} pacman -Ss '^{}$' | egrep -v "^($repo_name| )"
|
|
||||||
}
|
|
||||||
|
|
||||||
list_installed_paclist() {
|
|
||||||
paclist $repo_name | cut -d' ' -f1
|
|
||||||
}
|
|
||||||
|
|
||||||
list_installed() {
|
|
||||||
comm -12 <(pacman -Qq | sort) <(pacman -Slq $repo_name | sort)
|
|
||||||
}
|
|
||||||
|
|
||||||
reinstall() {
|
|
||||||
list_installed | xargs sudo pacman -S --noconfirm
|
|
||||||
}
|
|
||||||
|
|
||||||
update_installed() {
|
|
||||||
update $(list_installed | xargs aurchain)
|
|
||||||
}
|
|
||||||
|
|
||||||
clean() {
|
|
||||||
# git clean -e 'aur/*' -dxn | grep -v .git
|
|
||||||
git clean -e '*.git*' -e 'aur/*' -dxf
|
|
||||||
}
|
|
||||||
|
|
||||||
undo() {
|
|
||||||
patch -p1 -R < undo.diff
|
|
||||||
}
|
|
||||||
|
|
||||||
grep_deps() {
|
|
||||||
grep "$1" src/*/PKGBUILD
|
|
||||||
}
|
|
||||||
|
|
||||||
git_add_changes() {
|
|
||||||
git add -f $(git status | grep -E '^.+(modified|deleted):' | sed 's/.* //' | tr '\n' ' ')
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$#" -gt 0 ]; then
|
|
||||||
[ -d "$src_dir" ] || mkdir -p "$src_dir"
|
|
||||||
[ -d "$pkg_dir" ] || mkdir -p "$pkg_dir"
|
|
||||||
$*
|
|
||||||
else
|
|
||||||
echo "Must specify a command, eg: add, build, list, clean"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
cd aur
|
|
||||||
cp -a /etc/pacman.conf /etc/pacman.d/mirrorlist ./
|
|
||||||
|
|
||||||
# sign everything
|
|
||||||
gpg -v pacman.conf.sig 2>/dev/null || (rm -f pacman.conf.sig; gpg -u 'ECB9B8CBAAC68C03!' -b pacman.conf)
|
|
||||||
gpg -v mirrorlist.sig 2>/dev/null || (rm -f mirrorlist.sig; gpg -u 'ECB9B8CBAAC68C03!' -b mirrorlist)
|
|
||||||
|
|
||||||
rsync -av --stats --progress --delete ./ root@mytorrentflux:/pacman/aur/ "$@"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
script="./arch-ppa"
|
|
||||||
|
|
||||||
[ "$1" == '-d' ] && script="echo $script" && shift
|
|
||||||
|
|
||||||
$script rebuild aur $(comm -23 <(git status | grep -o 'src/[^/]*/PKGBUILD' | sed -e 's@^src/@@' -e 's@/PKGBUILD$@@' | sort | uniq) <(echo "$@" | tr ' ' '\n' | sort | uniq) | tr '\n' ' ')
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
_pkgname=biboumi
|
_pkgname=biboumi
|
||||||
pkgname="$_pkgname-git"
|
pkgname="$_pkgname-git"
|
||||||
pkgver=9.0.r27.g2bd91dc
|
pkgver=9.0.r83.gbf958d0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="XMPP gateway to IRC"
|
pkgdesc="XMPP gateway to IRC"
|
||||||
arch=('x86_64' 'armv7h' 'aarch64')
|
arch=('x86_64' 'armv7h' 'aarch64')
|
||||||
@@ -12,10 +12,10 @@ backup=("etc/$_pkgname/$_pkgname.cfg")
|
|||||||
install="$_pkgname.install"
|
install="$_pkgname.install"
|
||||||
source=("$_pkgname::git+https://codeberg.org/poezio/biboumi"
|
source=("$_pkgname::git+https://codeberg.org/poezio/biboumi"
|
||||||
'biboumi.install'
|
'biboumi.install'
|
||||||
'sysuser.conf')
|
'biboumi.sysusers')
|
||||||
sha256sums=('SKIP'
|
sha256sums=('SKIP'
|
||||||
'7a50498d059e72b68a93057c51dc0766d9e39229f85da68721c78857ad8ce329'
|
'7a50498d059e72b68a93057c51dc0766d9e39229f85da68721c78857ad8ce329'
|
||||||
'45aed4eff7e06cc7bf54268e32de1630e0474131c817a47ddd4ef4134cf71dd1')
|
'910e6dc344c10f9ded3c5319592a5aaa1616d961d825e7392a40aa4b37c81174')
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
cd $_pkgname
|
cd $_pkgname
|
||||||
@@ -42,16 +42,13 @@ build() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
DESTDIR="$pkgdir/" cmake --install build
|
cd $_pkgname
|
||||||
|
|
||||||
install -dm755 "$pkgdir"/usr/share/doc/$_pkgname/
|
install -dm755 "$pkgdir"/usr/share/doc/$_pkgname/
|
||||||
cp -r html "$pkgdir"/usr/share/doc/$_pkgname/
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$_pkgname/LICENSE
|
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$_pkgname/LICENSE
|
||||||
install -Dm644 doc/*.rst "$pkgdir"/usr/share/doc/$_pkgname/
|
install -Dm644 doc/*.rst "$pkgdir"/usr/share/doc/$_pkgname/
|
||||||
install -Dm644 conf/biboumi.cfg "$pkgdir"/etc/$_pkgname/$_pkgname.cfg
|
install -Dm644 conf/biboumi.cfg "$pkgdir"/etc/$_pkgname/$_pkgname.cfg
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
install -Dm644 sysuser.conf "$pkgdir"/usr/lib/sysusers.d/$_pkgname.conf
|
install -Dm644 biboumi.sysusers "$pkgdir"/usr/lib/sysusers.d/$_pkgname.conf
|
||||||
|
|
||||||
|
DESTDIR="$pkgdir/" cmake --install build
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
g jabber 17 - -
|
||||||
|
u! biboumi - "Biboumi, XMPP gateway to IRC" /var/lib/biboumi
|
||||||
|
m biboumi jabber
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
g jabber 17 - -
|
|
||||||
u biboumi - "Biboumi, XMPP gateway to IRC" /var/lib/biboumi
|
|
||||||
m biboumi jabber
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# WARNING: DRAFT ONLY - No idea if it actually builds yet
|
||||||
|
_pkgname=slidge
|
||||||
|
pkgname="python-$_pkgname-git"
|
||||||
|
pkgver=0.1.0.r9.gc45818f
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='XMPP puppeteer gateway library in python'
|
||||||
|
arch=('x86_64' 'armv7h' 'aarch64')
|
||||||
|
url="https://slidge.im/"
|
||||||
|
license=('AGPL3')
|
||||||
|
depends=('python>=3.11' 'python-slixmpp>=1.12.0' 'python-slixmpp<1.13.0' 'python-aiohttp>=3.11.11' 'python-aiohttp<4' 'python-qrcode>=8.0' 'python-qrcode<9.0' 'python-magic>=0.4.27' 'python-magic<0.5' 'python-configargparse>=1.7' 'python-configargparse<2' 'python-pillow>=11.0.0' 'python-pillow<12' 'python-alembic>=1.14.0' 'python-alembic<2' 'python-sqlalchemy>=2' 'python-sqlalchemy<3' 'python-defusedxml>=0.7.1' 'python-blurhash')
|
||||||
|
# TODO: package python-thumbhash as python-blurhash replacement
|
||||||
|
makedepends=('git' 'python-build' 'python-wheel' 'python-installer' 'python-setuptools')
|
||||||
|
source=('git+https://codeberg.org/slidge/slidge')
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd $_pkgname
|
||||||
|
git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd $_pkgname
|
||||||
|
python -m build --wheel --no-isolation
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd slidge
|
||||||
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
_pkgname=thumbhash
|
||||||
|
pkgname="python-$_pkgname"
|
||||||
|
pkgver=0.1.2
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='Python port of thumbhash, a very compact representation of an image placeholder'
|
||||||
|
arch=('x86_64' 'aarch64')
|
||||||
|
url="https://github.com/justinforlenza/thumbhash-py"
|
||||||
|
license=('MIT')
|
||||||
|
depends=('python-pillow')
|
||||||
|
makedepends=(
|
||||||
|
'python-build'
|
||||||
|
'python-installer'
|
||||||
|
'python-wheel'
|
||||||
|
'python-hatchling'
|
||||||
|
)
|
||||||
|
checkdepends=('python-pytest')
|
||||||
|
source=("https://github.com/justinforlenza/thumbhash-py/releases/download/v${pkgver}/${_pkgname}-${pkgver}.tar.gz")
|
||||||
|
sha256sums=('ef4e6398f93f3b5ad480dc8e3a3b3a200813c86a8857fb069f8478be809f8247')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$_pkgname-$pkgver"
|
||||||
|
python -m build --wheel --no-isolation
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$_pkgname-$pkgver"
|
||||||
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
# Maintainer: Mike Wilson <aur at mjwilson dot org>
|
||||||
|
|
||||||
|
pkgname=qui
|
||||||
|
pkgver=1.13.1
|
||||||
|
pkgrel=2
|
||||||
|
pkgdesc="A fast, modern web interface for qBittorrent"
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://github.com/autobrr/qui"
|
||||||
|
license=('GPL-2.0-or-later')
|
||||||
|
makedepends=('git' 'go>=1.25' 'nodejs' 'pnpm')
|
||||||
|
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz"
|
||||||
|
"$pkgname.service"
|
||||||
|
"$pkgname.sysusers"
|
||||||
|
"$pkgname.tmpfiles")
|
||||||
|
sha256sums=('e21834262b6d08c72fa057efd5ecfcea3b51b4fc16da6210d11b6f8e1eb8f821'
|
||||||
|
'd52299510cf4845f0514eefd492b01c33bc2cd2819c2be9dc157f50f67462bd2'
|
||||||
|
'149029ffcc078976e0ac6cd1f002b25221bb1561a1c979362dc27d9e6ad5dda3'
|
||||||
|
'3bacde8867fbb7b6d566666b635589579c1cc079cd23418284f43a7b37f0c41b')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$pkgname-$pkgver"
|
||||||
|
mkdir -p build/
|
||||||
|
|
||||||
|
# Retrieve Go dependencies
|
||||||
|
export GOPATH="$srcdir"
|
||||||
|
# Don't proxy connection through Google
|
||||||
|
export GOPROXY=direct
|
||||||
|
go mod download -modcacherw
|
||||||
|
|
||||||
|
# Retrieve NodeJS dependencies
|
||||||
|
cd web
|
||||||
|
pnpm install
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$pkgname-$pkgver"
|
||||||
|
|
||||||
|
# Build frontend
|
||||||
|
pnpm --dir web run build
|
||||||
|
|
||||||
|
# Set Go flags
|
||||||
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||||
|
export CGO_CFLAGS="${CFLAGS}"
|
||||||
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||||
|
export CGO_LDFLAGS="${LDFLAGS}"
|
||||||
|
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -ldflags=-X=$url/internal/buildinfo.Version=$pkgver -mod=readonly -modcacherw"
|
||||||
|
|
||||||
|
# Build backend
|
||||||
|
go build -o build ./cmd/...
|
||||||
|
|
||||||
|
# Generate shell completions
|
||||||
|
"build/$pkgname" completion bash > bash_completion
|
||||||
|
"build/$pkgname" completion zsh > zsh_completion
|
||||||
|
"build/$pkgname" completion fish > fish_completion
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
cd "$pkgname-$pkgver"
|
||||||
|
go test ./...
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
# systemd files
|
||||||
|
install -Dm755 $pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
|
||||||
|
install -Dm755 $pkgname.sysusers "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
|
||||||
|
install -Dm755 $pkgname.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
|
||||||
|
|
||||||
|
cd "$pkgname-$pkgver"
|
||||||
|
|
||||||
|
# Binary
|
||||||
|
install -Dm755 "build/$pkgname" "$pkgdir/usr/bin/$pkgname"
|
||||||
|
|
||||||
|
# Shell Completions
|
||||||
|
install -Dm644 bash_completion "$pkgdir/usr/share/bash-completion/completions/$pkgname"
|
||||||
|
install -Dm644 zsh_completion "$pkgdir/usr/share/zsh/site-functions/$pkgname"
|
||||||
|
install -Dm644 fish_completion "$pkgdir/usr/share/fish/vendor_completions.d/$pkgname.fish"
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Modern alternative webUI for qBittorrent
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
Documentation=https://github.com/autobrr/qui
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=qui
|
||||||
|
Group=qui
|
||||||
|
Environment=HOME=/var/lib/qui
|
||||||
|
WorkingDirectory=/var/lib/qui
|
||||||
|
ExecStart=/usr/bin/qui serve
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
ProtectSystem=strict
|
||||||
|
ReadWritePaths=/var/lib/qui
|
||||||
|
ProtectHome=yes
|
||||||
|
PrivateTmp=yes
|
||||||
|
PrivateDevices=yes
|
||||||
|
NoNewPrivileges=yes
|
||||||
|
ProtectKernelModules=yes
|
||||||
|
ProtectKernelTunables=yes
|
||||||
|
ProtectControlGroups=yes
|
||||||
|
CapabilityBoundingSet=
|
||||||
|
LockPersonality=yes
|
||||||
|
MemoryDenyWriteExecute=yes
|
||||||
|
RestrictAddressFamilies=AF_INET AF_INET6
|
||||||
|
SystemCallArchitectures=native
|
||||||
|
SystemCallFilter=@system-service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
u! qui - "qui user" /var/lib/qui
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
d /var/lib/qui 0750 qui qui
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
# Maintainer: fossdd <fossdd@pwned.life>
|
||||||
|
|
||||||
|
pkgname=redlib-git
|
||||||
|
_pkgname=${pkgname%-git}
|
||||||
|
pkgver=v0.29.4.r504.a4d36e9
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Private front-end for Reddit"
|
||||||
|
url='https://github.com/redlib-org/redlib'
|
||||||
|
license=(AGPL-3.0)
|
||||||
|
arch=(x86_64)
|
||||||
|
depends=()
|
||||||
|
makedepends=(cargo git cmake make clang)
|
||||||
|
provides=($_pkgname)
|
||||||
|
conflicts=($_pkgname)
|
||||||
|
backup=("etc/$_pkgname.conf")
|
||||||
|
options=('!lto')
|
||||||
|
source=("$pkgname::git+$url")
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd "$srcdir/$pkgname"
|
||||||
|
# Git, tags available
|
||||||
|
printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
|
||||||
|
# Git, no tags available
|
||||||
|
# printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd $pkgname
|
||||||
|
export RUSTUP_TOOLCHAIN=stable
|
||||||
|
cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')"
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd $pkgname
|
||||||
|
export RUSTUP_TOOLCHAIN=stable
|
||||||
|
export CARGO_TARGET_DIR=target
|
||||||
|
cargo build --release --all-features
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$pkgname"
|
||||||
|
install -Dm755 "target/release/$_pkgname" -t "$pkgdir/usr/bin/"
|
||||||
|
install -Dm644 'LICENSE' -t "$pkgdir/usr/share/licenses/$pkgname/"
|
||||||
|
install -Dm644 'README.md' -t "$pkgdir/usr/share/doc/$pkgname/"
|
||||||
|
install -Dm644 "contrib/$_pkgname.service" -t "$pkgdir/usr/lib/systemd/system/"
|
||||||
|
install -Dm644 "contrib/$_pkgname.conf" -t "$pkgdir/etc/"
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
pkgbase = slidcord-git
|
||||||
|
pkgdesc = A feature-rich Discord to XMPP gateway
|
||||||
|
pkgver = r327.b3ad55d
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://codeberg.org/slidge/slidcord
|
||||||
|
arch = x86_64
|
||||||
|
arch = armv7h
|
||||||
|
arch = aarch64
|
||||||
|
license = AGPL-3.0-or-later
|
||||||
|
makedepends = git
|
||||||
|
makedepends = python-setuptools
|
||||||
|
makedepends = python-setuptools-scm
|
||||||
|
depends = python
|
||||||
|
depends = python-slidge
|
||||||
|
depends = python-emoji
|
||||||
|
depends = python-discord.py-self
|
||||||
|
source = git+https://codeberg.org/slidge/slidcord
|
||||||
|
source = slidcord.service
|
||||||
|
source = slidcord.sysusers
|
||||||
|
source = slidcord.tmpfiles
|
||||||
|
sha256sums = SKIP
|
||||||
|
sha256sums = 7d5091ec61bfb57e4e1a28726ca70b3c50b9f07a07cb0d6181d9bb39493c823d
|
||||||
|
sha256sums = 11ec643e2bb3ff65455e5d966053be62141c51a7e2521ede76ce78034360ae74
|
||||||
|
sha256sums = c7b387b8b2f2b266fcefb3f69552d605398858e378c0c88288ca6d371e605590
|
||||||
|
|
||||||
|
pkgname = slidcord-git
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
_pkgname=slidcord
|
||||||
|
pkgname="$_pkgname-git"
|
||||||
|
pkgver=r327.b3ad55d
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='A feature-rich Discord to XMPP gateway'
|
||||||
|
arch=('x86_64' 'armv7h' 'aarch64')
|
||||||
|
url="https://codeberg.org/slidge/slidcord"
|
||||||
|
license=('AGPL-3.0-or-later')
|
||||||
|
depends=('python' 'python-slidge' 'python-emoji' 'python-discord.py-self')
|
||||||
|
makedepends=('git' 'python-setuptools' 'python-setuptools-scm')
|
||||||
|
source=(
|
||||||
|
"git+$url"
|
||||||
|
"$_pkgname.service"
|
||||||
|
"$_pkgname.sysusers"
|
||||||
|
"$_pkgname.tmpfiles"
|
||||||
|
)
|
||||||
|
sha256sums=('SKIP'
|
||||||
|
'7d5091ec61bfb57e4e1a28726ca70b3c50b9f07a07cb0d6181d9bb39493c823d'
|
||||||
|
'11ec643e2bb3ff65455e5d966053be62141c51a7e2521ede76ce78034360ae74'
|
||||||
|
'c7b387b8b2f2b266fcefb3f69552d605398858e378c0c88288ca6d371e605590')
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd $_pkgname
|
||||||
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
git -C "${srcdir}/${_pkgname}" clean -dfx
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd $_pkgname
|
||||||
|
python -m build --wheel --no-isolation
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
# systemd files
|
||||||
|
install -Dm755 $_pkgname.service "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
|
||||||
|
install -Dm755 $_pkgname.sysusers "$pkgdir/usr/lib/sysusers.d/$_pkgname.conf"
|
||||||
|
install -Dm755 $_pkgname.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/$_pkgname.conf"
|
||||||
|
|
||||||
|
cd $_pkgname
|
||||||
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Discord XMPP gateway
|
||||||
|
After=network.target
|
||||||
|
Wants=network.target
|
||||||
|
#Requires=prosody.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=slidcord
|
||||||
|
Group=slidcord
|
||||||
|
UMask=0027
|
||||||
|
DynamicUser=yes
|
||||||
|
RuntimeDirectory=slidcord
|
||||||
|
StateDirectory=slidcord
|
||||||
|
ExecStart=/usr/bin/slidcord
|
||||||
|
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
ProtectSystem=strict
|
||||||
|
ProtectHome=true
|
||||||
|
PrivateDevices=true
|
||||||
|
ProtectKernelModules=true
|
||||||
|
ProtectKernelTunables=true
|
||||||
|
ProtectControlGroups=true
|
||||||
|
PrivateTmp=true
|
||||||
|
MountFlags=private
|
||||||
|
NoNewPrivileges=true
|
||||||
|
MemoryDenyWriteExecute=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
u! slidcord - "slidcord user" /var/lib/slidcord
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
d /var/lib/slidcord 0750 slidcord slidcord
|
||||||
Reference in new issue
Block a user