diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a565120..4f1b0d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -284,6 +284,7 @@ package-aur: - echo "Updating PKGBUILDS with release information..." - sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i ffsend/PKGBUILD - sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i ffsend-bin/PKGBUILD + - sed "s/^pkgver=.*\$/pkgver=$VERSION.$CI_COMMIT_SHORT_SHA/" -i ffsend-git/PKGBUILD - sed "s/^source=(\"\(.*\)::.*\").*\$/source=('\1::$(echo $URL_SOURCE | sed 's/\//\\\//g')')/" -i ffsend/PKGBUILD - sed "s/^source=(\"\(.*\)::.*\").*\$/source=('\1::$(echo $URL_BIN | sed 's/\//\\\//g')')/" -i ffsend-bin/PKGBUILD - sed "s/^sha256sums=.*\$/sha256sums=('$SHA_SOURCE')/" -i ffsend/PKGBUILD @@ -304,11 +305,11 @@ package-aur: - echo "Making main source package..." - sudo -u nobody makepkg -c - sudo -u nobody makepkg --printsrcinfo > .SRCINFO - # # TODO: only do this if the file has changed! - # - cd ../ffsend-git - # - echo "Making git source package..." - # - sudo -u nobody makepkg -c - # - sudo -u nobody makepkg --printsrcinfo > .SRCINFO + # TODO: only do this if the file has changed? + - cd ../ffsend-git + - echo "Making git source package..." + - sudo -u nobody makepkg -c + - sudo -u nobody makepkg --printsrcinfo > .SRCINFO - cd .. # Set up SSH for publishing @@ -343,14 +344,14 @@ package-aur: - git push - cd .. - # # Publish git package: clone AUR repo, commit update and push - # # TODO: only push here if things have changed! - # - git clone ssh://aur@aur.archlinux.org/ffsend.git aur-ffsend-git - # - cd aur-ffsend-git - # - cp ../ffsend-git/{PKGBUILD,.SRCINFO} ./ - # - git add PKGBUILD .SRCINFO - # - git commit -m "Release v$VERSION" - # - git push - # - cd .. + # Publish git package: clone AUR repo, commit update and push + # TODO: only push here if things have changed! + - git clone ssh://aur@aur.archlinux.org/ffsend.git aur-ffsend-git + - cd aur-ffsend-git + - cp ../ffsend-git/{PKGBUILD,.SRCINFO} ./ + - git add PKGBUILD .SRCINFO + - git commit -m "Update PKGBUILD for release v$VERSION" + - git push + - cd .. # TODO: add job to test ffsend{-git} AUR packages diff --git a/pkg/aur/ffsend-git/PKGBUILD b/pkg/aur/ffsend-git/PKGBUILD new file mode 100644 index 0000000..8fcdcc1 --- /dev/null +++ b/pkg/aur/ffsend-git/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer: Tim Visee +# +# This PKGBUILD is managed externally, and is automatically updated here: +# - https://gitlab.com/timvisee/ffsend/blob/master/pkg/aur/ffsend-git/PKGBUILD +# - Mirror: https://github.com/timvisee/ffsend/blob/master/pkg/aur/ffsend-git/PKGBUILD + +pkgname=ffsend-git +pkgver=0.0.0 # automatically set in CI, see: /.gitlab-ci.yml +pkgrel=1 +pkgdesc="Easily and securely share files from the command line. A Firefox Send client." +url="https://gitlab.com/timvisee/ffsend" +license=('GPL3') +source=("ffsend::git+$url.git") +sha256sums=('SKIP') +arch=('x86_64' 'i686') +provides=('ffsend') +conflicts=('ffsend') +depends=('ca-certificates') +makedepends=('openssl>=1.0' 'rust>=1.32' 'cargo' 'cmake') +optdepends=('xclip: clipboard support') + +build() { + cd ffsend + env CARGO_INCREMENTAL=0 cargo build --release +} + +package() { + install -Dm755 "$srcdir/ffsend/target/release/ffsend" "$pkgdir/usr/bin/ffsend" +}