Fedora packaging (hopefully)
Some checks failed
Deploy Website / deploy-website (push) Successful in 39s
Publish kewt-git to AUR / publish-aur-git (push) Successful in 21s
Release Standalone Builder / build (release) Successful in 27s
Release Standalone Builder / publish-fedora (release) Failing after 15s
Release Standalone Builder / publish-aur (release) Successful in 22s
Release Standalone Builder / publish-homebrew (release) Successful in 7s
Some checks failed
Deploy Website / deploy-website (push) Successful in 39s
Publish kewt-git to AUR / publish-aur-git (push) Successful in 21s
Release Standalone Builder / build (release) Successful in 27s
Release Standalone Builder / publish-fedora (release) Failing after 15s
Release Standalone Builder / publish-aur (release) Successful in 22s
Release Standalone Builder / publish-homebrew (release) Successful in 7s
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
pkgbase = kewt-git
|
||||
pkgdesc = A minimalist, 100% POSIX, static site generator inspired by werc and kew
|
||||
pkgver = r0.0000001
|
||||
pkgver = r0.0000002
|
||||
pkgrel = 1
|
||||
url = https://kewt.krzak.org
|
||||
arch = any
|
||||
license = ISC
|
||||
makedepends = git
|
||||
depends = sh
|
||||
optdepends = bash-completion: bash shell completions
|
||||
provides = kewt
|
||||
conflicts = kewt
|
||||
conflicts = kewt-bin
|
||||
|
||||
@@ -6,10 +6,13 @@ pkgbase = kewt-bin
|
||||
arch = any
|
||||
license = ISC
|
||||
depends = sh
|
||||
optdepends = bash-completion: bash shell completions
|
||||
provides = kewt
|
||||
conflicts = kewt
|
||||
conflicts = kewt-git
|
||||
source = kewt-bin-VERSION_PLACEHOLDER.sh::https://git.krzak.org/N0VA/kewt/releases/download/vVERSION_PLACEHOLDER/kewt
|
||||
source = kewt-bin-VERSION_PLACEHOLDER.bash::https://git.krzak.org/N0VA/kewt/releases/download/vVERSION_PLACEHOLDER/kewt.bash
|
||||
sha256sums = SHA256SUM_PLACEHOLDER
|
||||
sha256sums = SKIP
|
||||
|
||||
pkgname = kewt-bin
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Maintainer: n0va <n0va@krzak.org>
|
||||
pkgname=kewt-git
|
||||
pkgver=r0.0000001
|
||||
pkgver=r0.0000002
|
||||
pkgrel=1
|
||||
pkgdesc="A minimalist, 100% POSIX, static site generator inspired by werc and kew"
|
||||
arch=('any')
|
||||
@@ -28,4 +28,5 @@ package() {
|
||||
install -Dm755 kewt "${pkgdir}/usr/bin/kewt"
|
||||
install -d "${pkgdir}/usr/share/zsh/site-functions"
|
||||
"${pkgdir}/usr/bin/kewt" --dump-zsh-completions > "${pkgdir}/usr/share/zsh/site-functions/_kewt"
|
||||
install -Dm644 packaging/bash/kewt.bash "${pkgdir}/usr/share/bash-completion/completions/kewt"
|
||||
}
|
||||
|
||||
@@ -9,8 +9,9 @@ license=('ISC')
|
||||
depends=('sh')
|
||||
provides=('kewt')
|
||||
conflicts=('kewt' 'kewt-git')
|
||||
source=("${pkgname}-${pkgver}.sh::https://git.krzak.org/N0VA/kewt/releases/download/v${pkgver}/kewt")
|
||||
sha256sums=('SHA256SUM_PLACEHOLDER')
|
||||
source=("${pkgname}-${pkgver}.sh::https://git.krzak.org/N0VA/kewt/releases/download/v${pkgver}/kewt"
|
||||
"${pkgname}-${pkgver}.bash::https://git.krzak.org/N0VA/kewt/releases/download/v${pkgver}/kewt.bash")
|
||||
sha256sums=('SHA256SUM_PLACEHOLDER' 'SKIP')
|
||||
|
||||
build() {
|
||||
chmod +x "${srcdir}/${pkgname}-${pkgver}.sh"
|
||||
@@ -20,4 +21,5 @@ package() {
|
||||
install -Dm755 "${srcdir}/${pkgname}-${pkgver}.sh" "${pkgdir}/usr/bin/kewt"
|
||||
install -d "${pkgdir}/usr/share/zsh/site-functions"
|
||||
"${pkgdir}/usr/bin/kewt" --dump-zsh-completions > "${pkgdir}/usr/share/zsh/site-functions/_kewt"
|
||||
install -Dm644 "${srcdir}/${pkgname}-${pkgver}.bash" "${pkgdir}/usr/share/bash-completion/completions/kewt"
|
||||
}
|
||||
|
||||
37
packaging/bash/kewt.bash
Normal file
37
packaging/bash/kewt.bash
Normal file
@@ -0,0 +1,37 @@
|
||||
_kewt() {
|
||||
local cur prev opts
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
|
||||
opts="--help --new --init --clean --no-clean --update --post --generate-template --version --from --to --watch -w --serve -s --draft --dry-run"
|
||||
|
||||
case "$prev" in
|
||||
--from|--to)
|
||||
COMPREPLY=$(compgen -d -- "$cur")
|
||||
return 0
|
||||
;;
|
||||
--serve|-s)
|
||||
COMPREPLY=()
|
||||
return 0
|
||||
;;
|
||||
--new|--init|--update)
|
||||
COMPREPLY=$(compgen -d -- "$cur")
|
||||
return 0
|
||||
;;
|
||||
--generate-template)
|
||||
COMPREPLY=$(compgen -f -- "$cur")
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=$(compgen -W "$opts" -- "$cur")
|
||||
return 0
|
||||
fi
|
||||
|
||||
COMPREPLY=$(compgen -d -- "$cur")
|
||||
return 0
|
||||
}
|
||||
|
||||
complete -F _kewt kewt
|
||||
41
packaging/fedora/kewt.spec.template
Normal file
41
packaging/fedora/kewt.spec.template
Normal file
@@ -0,0 +1,41 @@
|
||||
Name: kewt
|
||||
Version: VERSION_PLACEHOLDER
|
||||
Release: 1%{?dist}
|
||||
Summary: A minimalist, 100% POSIX, static site generator inspired by werc
|
||||
|
||||
License: ISC
|
||||
URL: https://kewt.krzak.org
|
||||
Source0: https://git.krzak.org/N0VA/kewt/archive/v%{version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: make
|
||||
Requires: sh
|
||||
Requires: findutils
|
||||
Requires: grep
|
||||
Requires: sed
|
||||
Requires: gawk
|
||||
Recommends: python3
|
||||
Recommends: bash-completion
|
||||
|
||||
%description
|
||||
A minimalist, 100% POSIX, static site generator inspired by werc and kew
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
|
||||
%build
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install PREFIX=%{_prefix} BINDIR=%{_bindir} ZSHCOMPDIR=%{_datadir}/zsh/site-functions BASHCOMPDIR=%{_datadir}/bash-completion/completions
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{_bindir}/kewt
|
||||
%{_datadir}/zsh/site-functions/_kewt
|
||||
%{_datadir}/bash-completion/completions/kewt
|
||||
|
||||
%changelog
|
||||
* Mon May 20 2024 n0va <n0va@krzak.org> - VERSION_PLACEHOLDER-1
|
||||
- Initial package for Fedora
|
||||
@@ -9,7 +9,7 @@ class Kewt < Formula
|
||||
def install
|
||||
bin.install "kewt"
|
||||
chmod 0755, bin/"kewt"
|
||||
generate_completions_from_executable(bin/"kewt", "--dump-zsh-completions", shells: [:zsh])
|
||||
generate_completions_from_executable(bin/"kewt", "--dump-zsh-completions", shells: [:zsh, :bash])
|
||||
end
|
||||
|
||||
test do
|
||||
|
||||
@@ -17,6 +17,8 @@ _kewt() {
|
||||
'--to[Output directory]:directory:_directories'
|
||||
'(-w --watch)'{-w,--watch}'[Watch for file changes and rebuild automatically]'
|
||||
'(-s --serve)'{-s,--serve}'[Start a local HTTP server after building]::port:'
|
||||
'(-d --draft)'{-d,--draft}'[Include draft pages in the build]'
|
||||
'(-)--dry-run[Show what would be built without writing any files]'
|
||||
)
|
||||
|
||||
_arguments -S -C $args '*: :_directories'
|
||||
|
||||
Reference in New Issue
Block a user