Initial commit
This commit is contained in:
commit
98c03576c0
8 changed files with 246 additions and 0 deletions
48
.SRCINFO
Normal file
48
.SRCINFO
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
pkgbase = fdroidserver
|
||||||
|
pkgdesc = F-Droid repository management tools
|
||||||
|
pkgver = 2.4.2
|
||||||
|
pkgrel = 1
|
||||||
|
epoch = 1
|
||||||
|
url = https://gitlab.com/fdroid/fdroidserver
|
||||||
|
arch = any
|
||||||
|
license = GPL-3.0-or-later
|
||||||
|
makedepends = python-babel
|
||||||
|
depends = python
|
||||||
|
depends = python-pyasn1
|
||||||
|
depends = python-pyasn1-modules
|
||||||
|
depends = python-magic
|
||||||
|
depends = python-requests
|
||||||
|
depends = python-yaml
|
||||||
|
depends = python-ruamel-yaml
|
||||||
|
depends = java-environment
|
||||||
|
depends = python-pillow
|
||||||
|
depends = python-vagrant
|
||||||
|
depends = python-gitpython
|
||||||
|
depends = python-asn1crypto
|
||||||
|
depends = python-paramiko
|
||||||
|
depends = python-qrcode
|
||||||
|
depends = python-setuptools
|
||||||
|
depends = python-defusedxml
|
||||||
|
depends = python-platformdirs
|
||||||
|
depends = libvirt-python
|
||||||
|
depends = python-lxml
|
||||||
|
optdepends = android-sdk: Build apps from source
|
||||||
|
optdepends = android-sdk-build-tools: Work with apks in the repository
|
||||||
|
optdepends = android-sdk-platform-tools: Ability to install apps to connected devices
|
||||||
|
optdepends = android-ndk: Build apps that use native code
|
||||||
|
optdepends = apache-ant: Build apps using Apache Ant
|
||||||
|
optdepends = maven: Build apps using Maven
|
||||||
|
optdepends = gradle: Build apps using Gradle
|
||||||
|
optdepends = android-support-repository: Build apps using Maven or Gradle that use support libraries
|
||||||
|
optdepends = git: Download app sources that use git or svn (via git svn)
|
||||||
|
optdepends = mercurial: Download app sources that use hg
|
||||||
|
optdepends = bzr: Download app sources that use bzr
|
||||||
|
optdepends = rsync: Transfer repo files to the web server
|
||||||
|
optdepends = vagrant: Buildserver virtual machine support
|
||||||
|
optdepends = virtualbox: Buildserver virtual machine support
|
||||||
|
optdepends = wordpress: Web repository plugin
|
||||||
|
options = !emptydirs
|
||||||
|
source = fdroidserver-2.4.2.tar.gz::https://gitlab.com/fdroid/fdroidserver/-/archive/2.4.2/fdroidserver-2.4.2.tar.gz
|
||||||
|
b2sums = c05163a9dd06011382c2e158c679d144b4a9187321d517575c741025c95943e91b47f16d34772894e2cc7b7761c9e425994d59c74e73893f23157cbbdc483f8d
|
||||||
|
|
||||||
|
pkgname = fdroidserver
|
||||||
16
.gitignore
vendored
Normal file
16
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Ignore everything
|
||||||
|
*
|
||||||
|
|
||||||
|
# But not these files...
|
||||||
|
!.gitignore
|
||||||
|
!PKGBUILD
|
||||||
|
!.SRCINFO
|
||||||
|
!LICENSE
|
||||||
|
!chroot-build
|
||||||
|
!.nvchecker.toml
|
||||||
|
!/keys
|
||||||
|
!/keys/pgp
|
||||||
|
!/keys/pgp/*.asc
|
||||||
|
!/LICENSES
|
||||||
|
!/LICENSES/*.txt
|
||||||
|
!REUSE.toml
|
||||||
3
.nvchecker.toml
Normal file
3
.nvchecker.toml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[fdroidserver]
|
||||||
|
source = "git"
|
||||||
|
git = "https://gitlab.com/fdroid/fdroidserver.git"
|
||||||
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
|
||||||
78
PKGBUILD
Normal file
78
PKGBUILD
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
# Maintainer: Christian Schendel <doppelhelix@gmail.com>
|
||||||
|
# Contributor: AlexanderR <alexander.r@gmx.com>
|
||||||
|
# Contributor: fordprefect <fordprefect@dukun.de>
|
||||||
|
|
||||||
|
pkgname=fdroidserver
|
||||||
|
pkgver=2.4.2
|
||||||
|
epoch=1
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="F-Droid repository management tools"
|
||||||
|
url="https://gitlab.com/fdroid/$pkgname"
|
||||||
|
license=(
|
||||||
|
GPL-3.0-or-later
|
||||||
|
)
|
||||||
|
depends=(
|
||||||
|
python
|
||||||
|
python-pyasn1
|
||||||
|
python-pyasn1-modules
|
||||||
|
python-magic
|
||||||
|
python-requests
|
||||||
|
python-yaml
|
||||||
|
python-ruamel-yaml
|
||||||
|
java-environment
|
||||||
|
python-pillow
|
||||||
|
python-vagrant
|
||||||
|
python-gitpython
|
||||||
|
python-asn1crypto
|
||||||
|
python-paramiko
|
||||||
|
python-qrcode
|
||||||
|
python-setuptools
|
||||||
|
python-defusedxml
|
||||||
|
python-platformdirs
|
||||||
|
libvirt-python
|
||||||
|
python-lxml
|
||||||
|
)
|
||||||
|
makedepends=(
|
||||||
|
python-babel
|
||||||
|
)
|
||||||
|
optdepends=(
|
||||||
|
'android-sdk: Build apps from source'
|
||||||
|
'android-sdk-build-tools: Work with apks in the repository'
|
||||||
|
'android-sdk-platform-tools: Ability to install apps to connected devices'
|
||||||
|
'android-ndk: Build apps that use native code'
|
||||||
|
'apache-ant: Build apps using Apache Ant'
|
||||||
|
'maven: Build apps using Maven'
|
||||||
|
'gradle: Build apps using Gradle'
|
||||||
|
'android-support-repository: Build apps using Maven or Gradle that use support libraries'
|
||||||
|
'git: Download app sources that use git or svn (via git svn)'
|
||||||
|
'mercurial: Download app sources that use hg'
|
||||||
|
'bzr: Download app sources that use bzr'
|
||||||
|
'rsync: Transfer repo files to the web server'
|
||||||
|
'vagrant: Buildserver virtual machine support'
|
||||||
|
'virtualbox: Buildserver virtual machine support'
|
||||||
|
'wordpress: Web repository plugin'
|
||||||
|
)
|
||||||
|
arch=('any')
|
||||||
|
options=(!emptydirs)
|
||||||
|
source=("$pkgname-$pkgver.tar.gz::https://gitlab.com/fdroid/fdroidserver/-/archive/${pkgver}/fdroidserver-${pkgver}.tar.gz")
|
||||||
|
b2sums=('c05163a9dd06011382c2e158c679d144b4a9187321d517575c741025c95943e91b47f16d34772894e2cc7b7761c9e425994d59c74e73893f23157cbbdc483f8d')
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||||
|
|
||||||
|
python setup.py compile_catalog
|
||||||
|
python setup.py bdist_egg
|
||||||
|
python setup.py install --root="$pkgdir/" --optimize=1 --install-data="/usr"
|
||||||
|
|
||||||
|
mkdir -p "$pkgdir/usr/bin"
|
||||||
|
install "fdroid" "$pkgdir/usr/bin"
|
||||||
|
#install "fd-commit" "$pkgdir/usr/bin"
|
||||||
|
install -D gradlew-fdroid "$pkgdir/usr/lib/python$(python --version|cut -f2 -d" "|cut -f1,2 -d".")/site-packages/gradlew-fdroid"
|
||||||
|
|
||||||
|
install -D completion/bash-completion "$pkgdir/usr/share/bash-completion/completions/fdroidserver"
|
||||||
|
|
||||||
|
mkdir -p "$pkgdir/opt/android-sdk/tools"
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim: set ft=sh ts=4 sw=4 et:
|
||||||
|
|
||||||
23
REUSE.toml
Normal file
23
REUSE.toml
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
version = 1
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = [
|
||||||
|
"PKGBUILD",
|
||||||
|
"README.md",
|
||||||
|
"keys/**",
|
||||||
|
".SRCINFO",
|
||||||
|
".nvchecker.toml",
|
||||||
|
".gitignore",
|
||||||
|
"*.install",
|
||||||
|
"*.sysusers",
|
||||||
|
"*.tmpfiles",
|
||||||
|
"*.logrotate",
|
||||||
|
"*.pam",
|
||||||
|
"*.service",
|
||||||
|
"*.socket",
|
||||||
|
"*.timer",
|
||||||
|
"*.desktop",
|
||||||
|
"*.hook",
|
||||||
|
]
|
||||||
|
SPDX-FileCopyrightText = "Arch Linux contributors"
|
||||||
|
SPDX-License-Identifier = "0BSD"
|
||||||
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 python-vagrant
|
||||||
|
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