Skip to content

Commit 79c9e75

Browse files
committed
feat: add partially working package builds
1 parent 05e62b2 commit 79c9e75

File tree

9 files changed

+186
-0
lines changed

9 files changed

+186
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto
2+
.glue

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package/aur/**
2+
package/deb/**
3+
package/rpm/**
4+
!package/*/run.sh
5+
!package/*/toast.yml
6+
!package/*/PKGBUILD
7+
!package/*/*.spec

package/aur/PKGBUILD

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Maintainer: Edwin Kofler <[email protected]>
2+
pkgname='bash-args'
3+
pkgver='0.5.0'
4+
pkgrel='1'
5+
pkgdesc='A cute little Bash library for blazing fast argument parsing'
6+
arch=('any')
7+
url="https://github.com/eankeen/bash-args"
8+
license=('unknown')
9+
depends=(bash)
10+
source=($pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz)
11+
sha256sums=('144ae369fa414500ad806a27b28a557cd085fbceb207c98d69373f95955304c5')
12+
13+
_mainfolder=$_name-$pkgver
14+
15+
# prepare() {
16+
# :
17+
# }
18+
19+
# build() {
20+
# :
21+
# }
22+
23+
# check() {
24+
# :
25+
# }
26+
27+
package() {
28+
cd "$pkgname-$pkgver"
29+
30+
install -d "$pkgdir"/usr/{bin,lib/bash-args/util}
31+
install -m755 bin/* "$pkgdir/usr/bin"
32+
install -m755 lib/util/* "$pkgdir/usr/lib/bash-args/util"
33+
# install -m644 lib/util/* "$pkgdir/lib/bash-args/util"
34+
}

package/aur/run.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env sh
2+
set -ex
3+
4+
# makerepropkg *.zst
5+
# repro -f *.zst
6+
7+
# makepkg -Cfsr
8+
makepkg -Cfsrc
9+
10+
namcap PKGBUILD
11+
namcap ./*.zst
12+
13+
pacman -Qlp ./*.zst

package/deb/run.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env sh
2+
set -ex
3+
4+
# wget https://github.com/eankeen/bash-args/archive/refs/tags/v0.5.0.tar.gz
5+
# mv v0.5.0.tar.gz bash-args_0.5.0.orig.tar.gz
6+
# tar xf bash-args_0.5.0.orig.tar.gz
7+
cd 'bash-args-0.5.0'
8+
rm -rf debian
9+
mkdir -p debian
10+
11+
# cme
12+
13+
# dch --create -v 0.5.0-1 --package bash-args || :
14+
dch --create --distribution unstable --package "bash-args" --newversion 0.5.0-1.test "some nice message" || :
15+
16+
# compat for debhelper tool
17+
cat >| debian/compat <<"EOF"
18+
10
19+
EOF
20+
21+
# binary packages (second section) can have multiple
22+
cat >| debian/control <<"EOF"
23+
Source: bash-args
24+
Maintainer: Edwin Kofler <[email protected]>
25+
Section: misc
26+
Priority: optional
27+
Standards-Version: 3.9.2
28+
Build-Depends: debhelper (>= 9)
29+
30+
Package: args.parse
31+
Architecture: all
32+
Depends: ${shlibs:Depends}, ${misc:Depends}
33+
Description: A cute little Bash library for blazing fast argument parsing
34+
EOF
35+
36+
touch debian/copyright
37+
38+
cat >| debian/rules <<"EOF"
39+
#!/usr/bin/make -f
40+
%:
41+
dh $@
42+
EOF
43+
44+
mkdir -p debian/source
45+
cat >| debian/source/format <<"EOF"
46+
3.0 (quilt)
47+
EOF
48+
49+
cat >| debian/args.parse.dirs <<"EOF"
50+
usr/bin
51+
EOF
52+
53+
cd debian
54+
55+
debuild -us -uc

package/deb/toast.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
image: debian
2+
default: main
3+
tasks:
4+
bootstrap:
5+
command: |
6+
set -Eeuo pipefail
7+
apt-get update -y
8+
DEBIAN_FRONTEND=noninteractive apt-get install -y sudo vim expect
9+
# TODO: not working with image:ubuntu when NOT on tty
10+
# unbuffer -p expect -c 'if {[ catch { close stdin; open /dev/tty; } err ]} { puts stderr $err; exit 1; }; spawn unminimize; expect -- "*"; send -- "y\n"; expect -- "*"; send -- "y\n"; interact'
11+
12+
init:
13+
dependencies: [ bootstrap ]
14+
command: |
15+
DEBIAN_FRONTEND=noninteractive apt-get install -y sudo devscripts debhelper dh-make
16+
useradd -m op -s /bin/bash -G sudo
17+
chpasswd <<< 'op:password'
18+
19+
main:
20+
dependencies: [ init ]
21+
cache: false
22+
user: op
23+
mount_paths:
24+
- .

package/rpm/bash-args.spec

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Name: bash-args
2+
Version: 0.5.0
3+
Release: 1%{?dist}
4+
Summary: A cute little Bash library for blazing fast argument parsing
5+
Group:
6+
License: Public Domain
7+
Source0: bash-args-0.5.0
8+
# Source0: https://github.com/eankeen/bash-args/download/%{name}/%{name}-${version}.tar.gz
9+
URL: https://github.com/eankeen/bash-args
10+
# Requires: bash
11+
12+
%description
13+
A cute little Bash library for blazing fast argument parsing
14+
15+
%install
16+
mkdir -p %{buildroot}%{_bindir}
17+
install -p -m 755 %{SOURCE0} %{buildroot}%{_bindir}
18+
19+
%files
20+
21+
%changelog

package/rpm/run.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env sh
2+
set -ex
3+
4+
# wget https://github.com/eankeen/bash-args/archive/refs/tags/v0.5.0.tar.gz
5+
# mv v0.5.0.tar.gz bash-args_0.5.0.orig.tar.gz
6+
# tar xf bash-args_0.5.0.orig.tar.gz
7+
8+
fedpkg --release f34 local

package/rpm/toast.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
image: fedora
2+
default: main
3+
tasks:
4+
bootstrap:
5+
command: |
6+
set -Eeuo pipefail
7+
dnf -y install vim man-db
8+
9+
init:
10+
dependencies: [ bootstrap ]
11+
command: |
12+
set -Eeuo pipefail
13+
dnf -y install fedora-packager fedora-review wget
14+
useradd -m op -s /bin/bash -G wheel
15+
chpasswd <<< 'op:password'
16+
17+
main:
18+
dependencies: [ init ]
19+
cache: false
20+
user: op
21+
mount_paths:
22+
- .

0 commit comments

Comments
 (0)