Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New packages: lemmy-0.18.4, lemmy-ui-0.18.4 #45170

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions srcpkgs/lemmy-ui/files/lemmy-ui/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
exec 2>&1
[ -r ./conf ] && . ./conf
cd /usr/lib/lemmy-ui || exit 1
exec chpst -u _lemmyui:_lemmyui node dist/js/server.js
58 changes: 58 additions & 0 deletions srcpkgs/lemmy-ui/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Template file for 'lemmy-ui'
pkgname=lemmy-ui
version=0.18.5
revision=1
_translation_commit=1c42c579460871de7b4ea18e58dc25543b80d289
hostmakedepends="yarn pkg-config python3"
makedepends="libvips-devel"
depends="nodejs"
short_desc="Official web app for lemmy"
maintainer="Joel Beckmeyer <[email protected]>"
license="AGPL-3.0-only"
homepage="https://join-lemmy.org/"
distfiles="https://github.com/LemmyNet/lemmy-ui/archive/refs/tags/${version}.tar.gz
https://github.com/LemmyNet/lemmy-translations/archive/${_translation_commit}.tar.gz"
checksum="8733497b6269d3d2e02ef3ad3ec87d76ed981cbebd924aef5313b8fe85211737
7775b2a3070205f9b4b099215b30ee6bef3d5fb0c4e95aab52697e2bcb7cf9f7"
python_version=3
system_accounts="_lemmyui"

export NODE_ENV=production
case "$XBPS_TARGET_MACHINE" in
aarch64*) export npm_config_arch=arm64;;
armv5*) export npm_config_arch=arm; export npm_config_arm_version=5;;
armv6*) export npm_config_arch=arm; export npm_config_arm_version=6;;
armv7*) export npm_config_arch=arm; export npm_config_arm_version=7;;
i686*) export npm_config_arch=ia32;;
x86_64*) export npm_config_arch=x64;;
esac
export npm_config_build_from_source=true
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
export npm_config_libc=musl
fi
export npm_config_platform=linux

post_extract() {
cp -r lemmy-ui-${version}/. .
cp -r lemmy-translations-${_translation_commit}/. lemmy-translations
rm -rf lemmy-${version} lemmy-translations-${_translation_commit}

yarn install --pure-lockfile
}

post_patch() {
vsed -i "s/unknown version/$version/" src/shared/version.ts
}

do_build() {
yarn build:prod
}

do_install() {
npm prune
vmkdir usr/lib/lemmy-ui
vcopy dist usr/lib/lemmy-ui
vcopy node_modules usr/lib/lemmy-ui
vlicense LICENSE
vsv lemmy-ui
}
6 changes: 6 additions & 0 deletions srcpkgs/lemmy/files/lemmy/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
exec 2>&1
[ -r ./conf ] && . ./conf
export LEMMY_CONFIG_LOCATION=${LEMMY_CONFIG_LOCATION:-/etc/lemmy/lemmy.hjson}
cd /var/lib/lemmy || exit 1
exec chpst -u _lemmy:_lemmy lemmy_server
40 changes: 40 additions & 0 deletions srcpkgs/lemmy/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Template file for 'lemmy'
pkgname=lemmy
version=0.18.5
revision=1
_translation_commit=1c42c579460871de7b4ea18e58dc25543b80d289
build_style=cargo
configure_args="--features=embed-pictrs"
hostmakedepends="pkg-config protobuf"
makedepends="openssl-devel libpqxx-devel libzstd-devel"
depends="ImageMagick ffmpeg exiftool"
short_desc="Link aggregator and forum for the fediverse"
maintainer="Joel Beckmeyer <[email protected]>"
license="AGPL-3.0-only"
homepage="https://join-lemmy.org/"
changelog="https://raw.githubusercontent.com/LemmyNet/lemmy/main/RELEASES.md"
distfiles="https://github.com/LemmyNet/lemmy/archive/refs/tags/${version}.tar.gz
https://github.com/LemmyNet/lemmy-translations/archive/${_translation_commit}.tar.gz"
checksum="d366d805c0e57001cfc8a3d927a3313828bb75a415a1c13485a897af07f98b29
7775b2a3070205f9b4b099215b30ee6bef3d5fb0c4e95aab52697e2bcb7cf9f7"
system_accounts="_lemmy"
make_dirs="/var/lib/lemmy 0700 _lemmy _lemmy"
_lemmy_homedir="/var/lib/lemmy"
conf_files="/etc/lemmy/lemmy.hjson"

post_extract() {
cp -r lemmy-${version}/. .
cp -r lemmy-translations-${_translation_commit}/. crates/utils/translations
rm -rf lemmy-${version} lemmy-translations-${_translation_commit}
}

post_patch() {
vsed -i "s/unknown version/$version/" crates/utils/src/version.rs
}

post_install() {
vsconf config/defaults.hjson
vinstall config/config.hjson 644 etc/lemmy lemmy.hjson
vsv lemmy
vlicense LICENSE
}