Skip to content

Commit

Permalink
Merge pull request #16 from hertg/aur
Browse files Browse the repository at this point in the history
Update npm dependencies, Address AUR issues
  • Loading branch information
hertg committed Oct 6, 2023
2 parents 6a760f2 + ea4ea38 commit 25d2dbc
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 168 deletions.
70 changes: 51 additions & 19 deletions .ci/generate-pkgbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,71 @@
version=$1
checksum=$2

# remove the "v" prefix
pkgver=$(echo ${version#v} | sed 's/\([^-]*-g\)/r\1/;s/-/./g')

#### lightdm-theme-neon ####

mkdir -p ./.pkgbuild/lightdm-theme-neon
cp ./.pkg/aur/lightdm-theme-neon/* ./.pkgbuild/lightdm-theme-neon

cat << EOF > ./.pkgbuild/lightdm-theme-neon/PKGBUILD
# Maintainer: hertg <[email protected]>
# This file is generated automatically
_version=$version
_versionWithoutPrefix=${version#v}
_pkgname=lightdm-theme-neon
_pkgver=$(echo $version | sed 's/\([^-]*-g\)/r\1/;s/-/./g')
_source=\${_pkgname}-\${_version}::https://github.com/hertg/lightdm-neon/archive/refs/tags/$version.tar.gz
EOF
# This file is generated automatically via CI
pkgname=lightdm-theme-neon
pkgver=$pkgver
pkgdesc='Modern and customizable theme for web-greeter with a nostalgic neon look'
pkgrel=1
arch=('any')
license=('GPL')
url='https://github.com/hertg/lightdm-neon'
makedepends=('npm' 'git')
optdepends=()
provides=()
conflicts=()
source=("\${pkgname}-${pkgver}.tar.gz::https://github.com/hertg/lightdm-neon/archive/refs/tags/$version.tar.gz")
sha256sums=('SKIP')
cat ./.pkgbuild/lightdm-theme-neon/PKGBUILD.template >> ./.pkgbuild/lightdm-theme-neon/PKGBUILD
rm ./.pkgbuild/lightdm-theme-neon/PKGBUILD.template
build() {
npm install
npm run build
}
package() {
# note: the directory is called "lightdm-neon-{version}", because the github
# archive extracts to a directory called "{repository}-{version}", not what
# is specified in the source() of the PKGBUILD
cd \${srcdir}/lightdm-neon-\${pkgver}
install -dm755 "\${pkgdir}/usr/share/web-greeter/themes/neon"
cp -r public/. "\${pkgdir}/usr/share/web-greeter/themes/neon"
}
EOF

#### lightdm-theme-neon-bin ####

mkdir -p ./.pkgbuild/lightdm-theme-neon-bin
cp ./.pkg/aur/lightdm-theme-neon-bin/* ./.pkgbuild/lightdm-theme-neon-bin

cat << EOF > ./.pkgbuild/lightdm-theme-neon-bin/PKGBUILD
# Maintainer: hertg <[email protected]>
# This file is generated automatically
_version=$version
_pkgname=lightdm-theme-neon-bin
_pkgver=$(echo $version | sed 's/\([^-]*-g\)/r\1/;s/-/./g')
_sha256sum=$checksum
_source=\${_pkgname}-\${_pkgver}::https://github.com/hertg/lightdm-neon/releases/download/$version/build.tar.gz
# This file is generated automatically via CI
pkgname=lightdm-theme-neon-bin
pkgver=$pkgver
pkgdesc='Modern and customizable theme for web-greeter with a nostalgic neon look'
pkgrel=1
arch=('any')
license=('GPL')
url='https://github.com/hertg/lightdm-neon'
makedepends=()
optdepends=()
provides=()
conflicts=()
source=("lightdm-theme-neon-bin-${pkgver}.tar.gz::https://github.com/hertg/lightdm-neon/releases/download/$version/build.tar.gz")
sha256sums=(${checksum})
package() {
cd \${srcdir}
install -dm755 "\${pkgdir}/usr/share/web-greeter/themes/neon"
cp -r public/. "\${pkgdir}/usr/share/web-greeter/themes/neon"
}
EOF

cat ./.pkgbuild/lightdm-theme-neon-bin/PKGBUILD.template >> ./.pkgbuild/lightdm-theme-neon-bin/PKGBUILD
rm ./.pkgbuild/lightdm-theme-neon-bin/PKGBUILD.template
1 change: 1 addition & 0 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ jobs:
with:
draft: false
files: download/build.tar.gz
body_path: CHANGELOG.md
prerelease: ${{ contains(github.ref, '-rc.') }}
18 changes: 0 additions & 18 deletions .pkg/aur/lightdm-theme-neon-bin/PKGBUILD.template

This file was deleted.

25 changes: 0 additions & 25 deletions .pkg/aur/lightdm-theme-neon/PKGBUILD.template

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## :lady_beetle: Fixes

- Updated PKGBUILD to fix issues with AUR release (#15)
- Update npm dependencies with moderate security vulnerabilities
121 changes: 17 additions & 104 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 25d2dbc

Please sign in to comment.