diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 00000000..15e3d614 --- /dev/null +++ b/.github/workflows/package.yml @@ -0,0 +1,79 @@ +name: Packages +on: [push, pull_request] + +jobs: + build-deb: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + distro: [ubuntu-groovy, ubuntu-focal, ubuntu-eoan] + steps: + - uses: actions/checkout@v2 + + # Determine which PPA we should upload to + - name: PPA + id: ppa + run: | + if [[ $REF == refs/tags* ]] + then + echo "::set-output name=ppa::kiwixteam/release" + else + echo "::set-output name=ppa::kiwixteam/dev" + fi + env: + REF: ${{ github.ref }} + + - uses: legoktm/gh-action-auto-dch@master + with: + fullname: Kiwix builder + email: release+launchpad@kiwix.org + distro: ${{ matrix.distro }} + + - uses: legoktm/gh-action-build-deb@ubuntu-groovy + if: matrix.distro == 'ubuntu-groovy' + name: Build package for ubuntu-groovy + id: build-ubuntu-groovy + with: + args: --no-sign + ppa: ${{ steps.ppa.outputs.ppa }} + + - uses: legoktm/gh-action-build-deb@ubuntu-focal + if: matrix.distro == 'ubuntu-focal' + name: Build package for ubuntu-focal + id: build-ubuntu-focal + with: + args: --no-sign + ppa: ${{ steps.ppa.outputs.ppa }} + + - uses: legoktm/gh-action-build-deb@ubuntu-eoan + if: matrix.distro == 'ubuntu-eoan' + name: Build package for ubuntu-eoan + id: build-ubuntu-eoan + with: + args: --no-sign + ppa: ${{ steps.ppa.outputs.ppa }} + + - uses: actions/upload-artifact@v2 + with: + name: Packages for ${{ matrix.distro }} + path: output + + - uses: legoktm/gh-action-dput@master + name: Upload dev package + # Only upload on pushes to master + if: github.event_name == 'push' && github.event.ref == 'refs/heads/master' && startswith(matrix.distro, 'ubuntu-') + with: + gpg_key: ${{ secrets.LAUNCHPAD_GPG }} + repository: ppa:kiwixteam/dev + packages: output/*_source.changes + + - uses: legoktm/gh-action-dput@master + name: Upload release package + # Only upload on pushes to master or tag + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && startswith(matrix.distro, 'ubuntu-') + with: + gpg_key: ${{ secrets.LAUNCHPAD_GPG }} + repository: ppa:kiwixteam/release + packages: output/*_source.changes + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..c8c2fa08 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +kiwix-tools (0.0.0) unstable; urgency=medium + + * Initial release + + -- Kunal Mehta Mon, 13 Jul 2020 17:21:11 -0700 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..f474dbdf --- /dev/null +++ b/debian/control @@ -0,0 +1,27 @@ +Source: kiwix-tools +Section: utils +Priority: optional +Maintainer: Kiwix team +Build-Depends: debhelper-compat (= 12), + libkiwix-dev (>= 9.3.0~), + libmicrohttpd-dev, + meson, + pkg-config, + zlib1g-dev +Standards-Version: 4.5.0 +Homepage: https://github.com/kiwix/kiwix-tools +Rules-Requires-Root: no + +Package: kiwix-tools +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: collection of Kiwix tools + kiwix-tools is a collection of various command-line tools used to help + users interact with and manage ZIM files. It includes: + * kiwix-serve is a standalone HTTP server for serving ZIM files + over the network. + * kiwix-manage allows one to manage the content of the Kiwix library (an + XML file listing available ZIM files). + * kiwix-read allows for reading ZIM files from the command-line. + * kiwix-search allows one to find articles in a ZIM file using fulltext + search patterns. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..ff463664 --- /dev/null +++ b/debian/copyright @@ -0,0 +1 @@ +See COPYING in the repository root. diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..098338c0 --- /dev/null +++ b/debian/rules @@ -0,0 +1,5 @@ +#!/usr/bin/make -f +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +%: + dh $@ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..89ae9db8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native)