Provided Debian Packaging files

PROBLEM STATEMENT:
Better-enums currently does not provide a way to deliver its contents as
a Debian package

SOLUTION:
Added Debian packaging files

DETAILS:
Follows the standard Debian Packaging rules. See https://www.debian.org/doc/manuals/debmake-doc/index.en.html

IMPACT ANALYSIS:
When making future releases, `debian/changelog` needs to be updated

TESTING:
- Ran `dpkg-buildpackage -us -uc -b`
- Ran `dpkc -c` on resulting DEB file
- Ran `lintian` on resulting DEB file
- Installed resulting DEB file and compiled against it using `pkg-config
--cflags better-enums`
This commit is contained in:
Paul Grinberg 2022-09-06 08:55:29 -05:00
parent 1e8f499ddf
commit 172b22fa9d
10 changed files with 76 additions and 0 deletions

6
.gitignore vendored
View File

@ -1,3 +1,4 @@
*.swp
*.pyc
*.obj
*.exe
@ -6,3 +7,8 @@ doc/html/
doc-publish/
test/cxxtest/*.cc
test/build
debian/.debhelper/
debian/better-enums0-dev.substvars
debian/better-enums0-dev/
debian/debhelper-build-stamp
debian/files

20
Makefile Normal file
View File

@ -0,0 +1,20 @@
prefix = /usr
includedir = $(prefix)/include
libdir = $(prefix)/lib/$(shell dpkg-architecture | grep DEB_TARGET_MULTIARCH | awk -F= '{print $$2}')
build:
install: enum.h better-enums.pc
install -D -m 444 enum.h $(DESTDIR)$(includedir)/better-enums/enum.h
install -D -m 644 better-enums.pc $(DESTDIR)$(libdir)/pkgconfig/better-enums.pc
dpkg-parsechangelog | grep '^Version: ' >> $(DESTDIR)$(libdir)/pkgconfig/better-enums.pc
clean:
rm -rf $(DESTDIR)
deb:
dpkg-buildpackage -us -uc -b
.PHONY: build install clean deb
# vi: ts=8:sw=8:noai:noexpandtab:filetype=make

9
better-enums.pc Normal file
View File

@ -0,0 +1,9 @@
prefix=/usr
libdir=${prefix}/lib
includedir=${prefix}/include/better-enums
Name: better_enums
Description: Reflective compile-time enum library with clean syntax, in a single header file, and without dependencies.
Requires:
Libs:
Cflags: -I${includedir}

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
better-enums (0.11.3) stable; urgency=low
* Initial Debian package release
-- Daikin ADC Controls Dev <Controls.Dev@daikinapplied.com> Tue, 06 Sep 2022 09:06:05 -0500

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
10

17
debian/control vendored Normal file
View File

@ -0,0 +1,17 @@
Source: better-enums
Section: libdevel
Priority: optional
Maintainer: Daikin ADC Controls Dev <Controls.Dev@daikinapplied.com>
Build-Depends: debhelper (>= 10)
Standards-Version: 4.1.2
Package: better-enums0-dev
Provides: better-enums-dev
Conflicts: better-enums-dev
Section: libdevel
Architecture: any
Depends: ${misc:Depends}
Description: Files needed to develop against better-enums
This package contains include files needed to develop applications
with better-enums.

7
debian/copyright vendored Normal file
View File

@ -0,0 +1,7 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: better-enums
Files: *
Copyright: 2012-2021, Anton Bachin
License: BSD 2-Clause "Simplified" License

1
debian/docs vendored Normal file
View File

@ -0,0 +1 @@
README.md

1
debian/examples vendored Normal file
View File

@ -0,0 +1 @@
example/101-special-values.cc example/103-bitset.cc example/104-quine.cc example/105-c++17-reflection.cc example/1-hello-world.cc example/2-conversions.cc example/3-iterate.cc example/4-switch.cc example/5-map.cc example/6-iostreams.cc example/7-safety.cc example/8-representation.cc example/9-constexpr.cc example/Makefile

9
debian/rules vendored Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/make -f
export DH_VERBOSE=1
VERSION := $(shell dpkg-parsechangelog | grep '^Version: ' | awk '{print $$2}')
%:
dh $@