Skip to content

Commit

Permalink
Merge pull request #2 from ARS101/main
Browse files Browse the repository at this point in the history
Adding debian package build script
  • Loading branch information
meshya authored May 28, 2024
2 parents 2af7afb + ebfbe37 commit ee7c46b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ It doesn't released in any repository yet, for try it you may use archlinux pkgb
- [x] Send maintainer to therapy ( Done by sohrab and HUSS )
- [x] publish in parch repos ( Done by sohrab )
- [ ] publish in AUR
- [ ] Add build file for debian
- [X] Add build file for debian
- [ ] Add build file for redhat
42 changes: 42 additions & 0 deletions package/debian/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash


pkgname="namban"
pkgver="0.2"
arch="amd64"
maintainer="meshya, D3F4U1T"
pkgdesc="A simple gui tool for set dns settings."
pkgdir="$(pwd)"/"$pkgname"_"$pkgver"_"$arch"
srcdir="$(pwd)/namban"

# TODO: Add the dependencies
# TODO: Create a CI/CD workflow to auto build the package

prepare() {
git clone -b "v$pkgver" --depth=1 "https://github.com/parchlinuxB/namban"
}

package() {
mkdir -p "$pkgdir/"{DEBIAN,'usr/'}
cp -r "$srcdir/package/files/rootfs/"{usr,etc} "$pkgdir/"
cp -r "$srcdir/src/" "$pkgdir/usr/lib/namban/src/"

echo "Package: $pkgname
Version: $pkgver
Architecture: $arch
Maintainer: $maintainer
Description: $pkgdesc" | tr -d '\t' > "$pkgdir/DEBIAN/control"

chmod +x "$pkgdir/usr/"{bin/namban,lib/namban/{nambanbin,namban-startup-check}}

dpkg-deb --build --root-owner-group "$pkgdir"
}

cleanup() {
rm -rf "$pkgdir"
rm -rf "$srcdir"
}

prepare
package
cleanup

0 comments on commit ee7c46b

Please sign in to comment.