summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2023-11-23 21:56:12 +0100
committerJoel Klinghed <the_jk@spawned.biz>2023-11-23 21:58:22 +0100
commitf55b3ffc5b2e2745e5392ce0022b9e38b2c7fa3d (patch)
tree87186961273bd251bbd9143691774f81eea9fd95
parent4d10bf26b8492e2cee2948b7689f1ef52ef296db (diff)
Add basic support for building a debian package
-rw-r--r--debian/.gitignore2
-rw-r--r--debian/changelog5
-rw-r--r--debian/control16
-rw-r--r--debian/copyright41
-rw-r--r--debian/debhelper-build-stamp1
-rw-r--r--debian/files3
-rwxr-xr-xdebian/rules24
-rw-r--r--debian/source/format1
-rw-r--r--debian/timer.debhelper.log1
-rw-r--r--debian/timer.substvars3
-rw-r--r--meson.build6
-rw-r--r--meson_options.txt1
12 files changed, 101 insertions, 3 deletions
diff --git a/debian/.gitignore b/debian/.gitignore
new file mode 100644
index 0000000..4f89ace
--- /dev/null
+++ b/debian/.gitignore
@@ -0,0 +1,2 @@
+.debhelper/
+timer/
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..a411cc9
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+timer (0.2-1) unstable; urgency=medium
+
+ * Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
+
+ -- the_jk <the_jk@spawned.biz> Thu, 23 Nov 2023 21:05:45 +0100
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..35ffb72
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,16 @@
+Source: timer
+Section: unknown
+Priority: optional
+Maintainer: the_jk <the_jk@spawned.biz>
+Build-Depends: debhelper-compat (= 13)
+Standards-Version: 4.5.1
+Homepage: <insert the upstream URL, if relevant>
+#Vcs-Browser: https://salsa.debian.org/debian/timer
+Vcs-Git: ssh://git.spawned.biz/srv/git/timer.git
+Rules-Requires-Root: no
+
+Package: timer
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: <insert up to 60 chars description>
+ <insert long description, indented with spaces>
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..a673170
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,41 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: timer
+Upstream-Contact: <preferred name and address to reach the upstream project>
+Source: <url://example.com>
+
+Files: *
+Copyright: <years> <put author's name and email here>
+ <years> <likewise for another author>
+License: MIT
+
+Files: debian/*
+Copyright: 2023 the_jk <the_jk@spawned.biz>
+License: MIT
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
+# Please avoid picking licenses with terms that are more restrictive than the
+# packaged work, as it may make Debian's contributions unacceptable upstream.
+#
+# If you need, there are some extra license texts available in two places:
+# /usr/share/debhelper/dh_make/licenses/
+# /usr/share/common-licenses/
diff --git a/debian/debhelper-build-stamp b/debian/debhelper-build-stamp
new file mode 100644
index 0000000..fe84f2c
--- /dev/null
+++ b/debian/debhelper-build-stamp
@@ -0,0 +1 @@
+timer
diff --git a/debian/files b/debian/files
new file mode 100644
index 0000000..5c7b7e6
--- /dev/null
+++ b/debian/files
@@ -0,0 +1,3 @@
+timer-dbgsym_0.2-1_amd64.deb debug optional automatic=yes
+timer_0.2-1_amd64.buildinfo unknown optional
+timer_0.2-1_amd64.deb unknown optional
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..cb56da8
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,24 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+# package maintainers to append LDFLAGS
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+
+%:
+ dh $@
+
+override_dh_shlibdeps:
+ dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
+
+override_dh_auto_configure:
+ dh_auto_configure -- --buildtype=release -Ddebpkg=true
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/timer.debhelper.log b/debian/timer.debhelper.log
new file mode 100644
index 0000000..88782d9
--- /dev/null
+++ b/debian/timer.debhelper.log
@@ -0,0 +1 @@
+dh_shlibdeps
diff --git a/debian/timer.substvars b/debian/timer.substvars
new file mode 100644
index 0000000..bfc6999
--- /dev/null
+++ b/debian/timer.substvars
@@ -0,0 +1,3 @@
+shlibs:Depends=libc6 (>= 2.30), libgcc-s1 (>= 3.0), libsdbus-c++0 (>= 0.8.3), libstdc++6 (>= 9), libxcb-icccm4 (>= 0.4.1), libxcb-xkb1, libxcb-xrm0 (>= 0.0.0), libxcb1, libxkbcommon-x11-0 (>= 0.5.0), libxkbcommon0 (>= 0.5.0)
+misc:Depends=
+misc:Pre-Depends=
diff --git a/meson.build b/meson.build
index 499de00..d396a42 100644
--- a/meson.build
+++ b/meson.build
@@ -62,7 +62,7 @@ exe = executable('timer',
xdg_desktop_menu = find_program('xdg-desktop-menu', required: false,
native: true)
-if xdg_desktop_menu.found()
+if xdg_desktop_menu.found() and not get_option('debpkg')
meson.add_install_script(xdg_desktop_menu, 'install', '--novendor',
files('data/org.the_jk.timer.desktop'))
else
@@ -73,7 +73,7 @@ endif
xdg_icon_resource = find_program('xdg-icon-resource', required: false,
native: true)
-if xdg_icon_resource.found()
+if xdg_icon_resource.found() and not get_option('debpkg')
meson.add_install_script(xdg_icon_resource, 'install', '--novendor',
'--size', '128', files('data/org.the_jk.timer.png'))
else
@@ -82,7 +82,7 @@ else
gtk_update_icon_cache = find_program('gtk-update-icon-cache',
required: false, native: true)
- if gtk_update_icon_cache.found()
+ if gtk_update_icon_cache.found() and not get_option('debpkg')
meson.add_install_script(gtk_update_icon_cache, icon_path)
endif
endif
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..2e54f4b
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1 @@
+option('debpkg', type: 'boolean', value : false)