Skip to content

Commit

Permalink
Merge pull request #52 from piersc/debian
Browse files Browse the repository at this point in the history
Basics for building deb packages
  • Loading branch information
Beerey authored Aug 1, 2017
2 parents 4286fa0 + 96d2b85 commit 9bd134c
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pkg_name := "configsnap"

version := $(shell ./configsnap --version | awk '{print $$NF}')
release := "1"
version_release := ${version}-${release}
deb_dist := "xenial"

files := $(shell ls configsnap)

debsources:
@which debchange >/dev/null && which dpkg-source >/dev/null || (echo "DEB build requires debchange and dpkg-source" && exit 1)
@mkdir -p ${pkg_name}-${version}
@cp -rp ${files} ${pkg_name}-${version}
@tar -zcf ${pkg_name}_${version}.orig.tar.gz ${pkg_name}-${version}
@cp -rpv debian ${pkg_name}-${version}
@cd ${pkg_name}-${version}; debchange --create -M --package ${pkg_name} -v ${version_release} --force-distribution -D ${deb_dist} ${pkg_name} ${version_release}
@dpkg-source -b ${pkg_name}-${version}
@rm -rf ${pkg_name}-${version}
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
1 change: 1 addition & 0 deletions debian/configsnap.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
configsnap /usr/bin
11 changes: 11 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Source: configsnap
Maintainer: Piers Cornwell <[email protected]>
Homepage: https://github.com/rackerlabs/configsnap
Section: admin
Priority: optional
Standards-Version: 3.9.6
Build-Depends: debhelper (>= 9)

Package: configsnap
Architecture: all
Description: configsnap records important system state information and can optionally compare with a previous state and identify changes
4 changes: 4 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/make -f

%:
dh $@
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)

0 comments on commit 9bd134c

Please sign in to comment.