From 0a1c0cc8d427570841cb410e8c539d53c2391a73 Mon Sep 17 00:00:00 2001 From: Baptiste Gaillard Date: Sat, 16 Dec 2023 09:07:34 +0100 Subject: [PATCH] Add Debian configuration. --- .github/workflows/mclip.yml | 16 ++++++++++++++++ .gitignore | 3 +++ CONTRIBUTING.md | 37 +++++++++++++++++++++++++++++++++++++ Makefile.am | 1 + debian/changelog | 5 +++++ debian/control | 17 +++++++++++++++++ debian/copyright | 11 +++++++++++ debian/rules | 12 ++++++++++++ 8 files changed, 102 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100755 debian/rules diff --git a/.github/workflows/mclip.yml b/.github/workflows/mclip.yml index 9bc1b4f..d7e10a8 100644 --- a/.github/workflows/mclip.yml +++ b/.github/workflows/mclip.yml @@ -19,6 +19,22 @@ jobs: - name: Make run: make + - name: Make dist + run: make dist + + - name: Debian package + run: | + sudo apt-get install -y devscripts debhelper + mkdir -p "${RUNNER_TEMP}/debian-packaging" + cp mclip-*.tar.gz "${RUNNER_TEMP}/debian-packaging" + cd "${RUNNER_TEMP}/debian-packaging" + ORIG_TAR_GZ=$(ls mclip-*.gz | sed -E 's/^mclip-([[:digit:]])\.([[:digit:]])\.([[:digit:]])\.tar\.gz$/mclip_\1.\2.\3\.orig\.tar\.gz/g') + mv mclip-*.tar.gz "${ORIG_TAR_GZ}" + tar xf "${ORIG_TAR_GZ}" + cd mclip-*/ + cp -R "${GITHUB_WORKSPACE}/debian" . + debuild -us -uc + - name: Upload uses: actions/upload-artifact@v3 with: diff --git a/.gitignore b/.gitignore index e3061cf..894360d 100644 --- a/.gitignore +++ b/.gitignore @@ -118,4 +118,7 @@ Makefile # Other ######################################################################################################################## +# make dist and make distdir +mclip-* +mclip_* src/mclip diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..6c355fe --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,37 @@ +# Contributing to mclip + +:+1::tada: First off, thanks for taking the time to contribute! :tada::+1: + +## Unix philosophy + +mclip responds to a very simple need, having a very simple clipboard manager which does not require any "big" dependency (X11, Wayland, etc.). + +It adheres to the [Unix philosophy](https://en.wikipedia.org/wiki/Unix_philosophy), it does one thing well and no more. + +Maintainers should keep in mind that the tool must stay as simple as possible. If it is it will be easy to maintain it and make it compatible with several operating systems and architectures. + +## How to help + +mclip must stay a very simple tool to use and maintain, we do not wish to add a lot of new features in it. + +As maintainers our goals should be to make it widely used, simple, secure and rock solid. + +Here are what you can do to help us improve it. + +- Report bugs ; +- Create packages for new Linux distributions ; +- Read the source code to find security problems, provide guidance and solutions to fix them ; +- Write MD files to explain how to use it with other tools (Neovim, Emacs, etc.). + +## Useful links + +- Autotools + - [Autoconf](https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/html_node/index.html) + - [GNU Automake](https://www.gnu.org/software/automake/manual/html_node/index.html) + - [Man Pages - The Complete Guide](https://betterprogramming.pub/man-pages-the-complete-guide-800ad93425fe) +- Linux distributions packaging + - [Debian](https://www.debian.org/) + - [Packaging Intro](https://wiki.debian.org/Packaging/Intro) + - [Debian New Maintainer's Guide](https://www.debian.org/doc/manuals/maint-guide/index.en.html) + - [Debian Policy Manual](https://www.debian.org/doc/debian-policy/index.html) + - [PackagingWithGit](https://wiki.debian.org/PackagingWithGit) diff --git a/Makefile.am b/Makefile.am index b23ad65..2845eb1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,4 @@ SUBDIRS = src dist_doc_DATA = README.md man_MANS = man/$(PACKAGE).1 +EXTRA_DIST = $(man_MANS) diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..66b3210 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +mclip (1.0.0-1) UNRELEASED; urgency=low + + * Initial release. + + -- Baptiste Gaillard Sat, 16 Dec 2023 09:00:37 +0100 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..3f03ad7 --- /dev/null +++ b/debian/control @@ -0,0 +1,17 @@ +Source: mclip +Section: utils +Priority: optional +Maintainer: Baptiste Gaillard +Build-Depends: debhelper-compat (= 13), dh-autoreconf +Standards-Version: 4.5.1 +Homepage: https://github.com/bgaillard/mclip +Rules-Requires-Root: no +Vcs-Git: https://github.com/bgaillard/mclip.git +#Vcs-Browser: https://salsa.debian.org/debian/mclip + +Package: mclip +Architecture: any +Multi-Arch: foreign +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: mclip (for "Memory CLIPboard") is a very simple clipboard manager which stores its data inside a POSIX + shared memory object. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..13aa099 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,11 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: mclip +Upstream-Contact: Baptiste Gaillard +Source: https://github.com/bgaillard/mclip +# +# Please double check copyright with the licensecheck(1) command. + +Files: + * +Copyright: 2023 Baptiste Gaillard +License: GPL-3+ diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..f0c70fd --- /dev/null +++ b/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f +# You must remove unused comment lines for the released package. +#export DH_VERBOSE = 1 +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +%: + dh $@ --with autoreconf + +#override_dh_install: +# dh_install --list-missing -X.la -X.pyc -X.pyo