initial commit
This commit is contained in:
commit
5f2de264e2
10 changed files with 181 additions and 0 deletions
11
.SRCINFO
Normal file
11
.SRCINFO
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
pkgbase = dalci-appstream-data
|
||||
pkgdesc = dalci application database for AppStream-based software centers
|
||||
pkgver = 20251014
|
||||
pkgrel = 1
|
||||
url = https://repo.doppelhelix.net
|
||||
arch = any
|
||||
license = LicenseRef-custom
|
||||
source = appstream-data.tar.gz
|
||||
b2sums = 242a22a6b15b05ab87f69bcba9e0b0fc433ed819073a9cf31e6149e894f04e4ebdd731e781869d5124f7b1d30217def1b69bf3788b890b7e621a8c21aabc1a24
|
||||
|
||||
pkgname = dalci-appstream-data
|
||||
2
.nvchecker.toml
Normal file
2
.nvchecker.toml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[dalci-appstream-data]
|
||||
source = "manual"
|
||||
12
LICENSE
Normal file
12
LICENSE
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Copyright Arch Linux Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for
|
||||
any purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
|
||||
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
|
||||
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
|
||||
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
||||
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
1
LICENSES/0BSD.txt
Symbolic link
1
LICENSES/0BSD.txt
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../LICENSE
|
||||
33
PKGBUILD
Normal file
33
PKGBUILD
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Maintainer: Christian Schendel <doppelhelix@gmail.com>
|
||||
|
||||
pkgname=dalci-appstream-data
|
||||
pkgver=20251014
|
||||
pkgrel=1
|
||||
pkgdesc='dalci application database for AppStream-based software centers'
|
||||
arch=(any)
|
||||
url='https://repo.doppelhelix.net'
|
||||
license=(
|
||||
LicenseRef-custom
|
||||
)
|
||||
depends=()
|
||||
makedepends=()
|
||||
source=(
|
||||
"appstream-data.tar.gz"
|
||||
)
|
||||
b2sums=('242a22a6b15b05ab87f69bcba9e0b0fc433ed819073a9cf31e6149e894f04e4ebdd731e781869d5124f7b1d30217def1b69bf3788b890b7e621a8c21aabc1a24')
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"/usr/share/swcatalog/{icons/archlinux-arch-{dalci,dalci-3rdparty}/{48x48,64x64,128x128},xml}
|
||||
for _repo in dalci dalci-3rdparty; do
|
||||
tar -xzf $_repo/icons-48x48.tar.gz \
|
||||
-C "$pkgdir"/usr/share/swcatalog/icons/archlinux-arch-$_repo/48x48
|
||||
tar -xzf $_repo/icons-64x64.tar.gz \
|
||||
-C "$pkgdir"/usr/share/swcatalog/icons/archlinux-arch-$_repo/64x64
|
||||
tar -xzf $_repo/icons-128x128.tar.gz \
|
||||
-C "$pkgdir"/usr/share/swcatalog/icons/archlinux-arch-$_repo/128x128
|
||||
install -m644 $_repo/Components-x86_64.xml.gz \
|
||||
"$pkgdir"/usr/share/swcatalog/xml/$_repo.xml.gz
|
||||
done
|
||||
}
|
||||
|
||||
# vim: set ts=4 sw=4 et:
|
||||
14
README.md
Normal file
14
README.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
**GENERATING METADATA**
|
||||
|
||||
1) Customize the `asgen-config.json` configuration file (don't rename it!):
|
||||
- `ArchiveRoot` should point to a directory containing a checkout of the binary repos.
|
||||
- `Backend` should be `archlinux` for alpm based packages.
|
||||
- In `Suites`, `sections` is a list with the repositories that should be indexed.
|
||||
- See https://github.com/ximion/appstream-generator/blob/master/docs/asgen-config.md for other options.
|
||||
2) Run `appstream-generator process arch` (Replace `arch` by the suite name configured in asgen-config.json)
|
||||
|
||||
**PACKAGING**
|
||||
|
||||
4) `Components-${arch}.xml.gz` files should be renamed to include the repo name and installed to `/usr/share/swcatalog/xml/`.
|
||||
|
||||
5) `Icons-${size}.tar.gz` should be decompressed and installed to `/usr/share/swcatalog/icons/`.
|
||||
24
REUSE.toml
Normal file
24
REUSE.toml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
version = 1
|
||||
|
||||
[[annotations]]
|
||||
path = [
|
||||
"PKGBUILD",
|
||||
"README.md",
|
||||
"keys/**",
|
||||
".SRCINFO",
|
||||
".nvchecker.toml",
|
||||
"*.install",
|
||||
"*.sysusers",
|
||||
"*.tmpfiles",
|
||||
"*.logrotate",
|
||||
"*.pam",
|
||||
"*.service",
|
||||
"*.socket",
|
||||
"*.timer",
|
||||
"*.desktop",
|
||||
"*.hook",
|
||||
"asgen-config.json",
|
||||
"upload",
|
||||
]
|
||||
SPDX-FileCopyrightText = "Arch Linux contributors"
|
||||
SPDX-License-Identifier = "0BSD"
|
||||
BIN
appstream-data.tar.gz
Normal file
BIN
appstream-data.tar.gz
Normal file
Binary file not shown.
19
asgen-config.json
Normal file
19
asgen-config.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"ProjectName": "ArchLinux",
|
||||
"ArchiveRoot": "/srv/ftp/",
|
||||
"Backend": "archlinux",
|
||||
"Features":
|
||||
{
|
||||
"validateMetainfo": true,
|
||||
"createScreenshotsStore": false,
|
||||
"noDownloads": true
|
||||
},
|
||||
"Suites":
|
||||
{
|
||||
"arch":
|
||||
{
|
||||
"sections": ["core", "extra", "multilib"],
|
||||
"architectures": ["x86_64"]
|
||||
}
|
||||
}
|
||||
}
|
||||
65
chroot-build
Executable file
65
chroot-build
Executable file
|
|
@ -0,0 +1,65 @@
|
|||
#!/bin/bash
|
||||
|
||||
# SPDX-FileCopyrightText: Christian Schendel
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
set -euo pipefail
|
||||
use_tmpfs=true
|
||||
CHROOT="/tmp/mkarchroot"
|
||||
|
||||
check_available_ram() {
|
||||
if [ "$(awk '/^MemAvailable:/ { print $2; }' /proc/meminfo)" -lt 50000 ]; then
|
||||
use_tmpfs=false
|
||||
fi
|
||||
}
|
||||
|
||||
create_chroot_directory() {
|
||||
if [ $use_tmpfs ]; then
|
||||
sudo mount --mkdir -t tmpfs -o defaults,size=20G tmpfs $CHROOT
|
||||
else
|
||||
sudo mkdir -p "$CHROOT"
|
||||
fi
|
||||
}
|
||||
|
||||
create_chroot_environment() {
|
||||
if [[ ! -d "$CHROOT/root" ]]; then
|
||||
mkarchroot -M ~/.config/pacman/makepkg.conf "$CHROOT/root" base-devel
|
||||
fi
|
||||
}
|
||||
|
||||
build_package(){
|
||||
arch-nspawn "$CHROOT/root" pacman -Syu
|
||||
if makechrootpkg -c -r "$CHROOT" -- -Asf . ; then
|
||||
makepkg --printsrcinfo >.SRCINFO
|
||||
else
|
||||
delete_chroot_environment && echo -e "\n\e[1;31m==> BUILD FAILED: \e[1;37m$CHROOT removed\e[0m " && exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
sign_package(){
|
||||
PACKAGE="$(makepkg --packagelist)"
|
||||
gpg --use-agent --output "$PACKAGE.sig" --detach-sign "$PACKAGE"
|
||||
}
|
||||
|
||||
delete_chroot_environment() {
|
||||
if [ "$(stat -f --format=%T "$CHROOT")" == "btrfs" ]; then
|
||||
{
|
||||
sudo btrfs subvolume delete "$CHROOT/root/var/lib/portables"
|
||||
sudo btrfs subvolume delete "$CHROOT/root/var/lib/machines"
|
||||
sudo btrfs subvolume delete "$CHROOT/root"
|
||||
sudo rm -Rf $CHROOT
|
||||
} >>/dev/null 2>&1
|
||||
elif [ "$(stat -f --format=%T "$CHROOT")" == "tmpfs" ]; then
|
||||
sudo umount -f $CHROOT
|
||||
fi
|
||||
sudo rm -Rf $CHROOT
|
||||
}
|
||||
|
||||
check_available_ram
|
||||
create_chroot_directory
|
||||
create_chroot_environment
|
||||
build_package
|
||||
sign_package
|
||||
delete_chroot_environment
|
||||
|
||||
# vim: set ts=4 sw=4 et:
|
||||
Loading…
Add table
Add a link
Reference in a new issue