diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..e4929742 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +yq (1.15-0) bionic; urgency=medium + + * Release 1.15 + + -- Roberto Mier Escandón Wed, 06 Jun 2018 11:32:03 +0200 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..65a184c0 --- /dev/null +++ b/debian/control @@ -0,0 +1,22 @@ +Source: yq +Section: devel +Priority: extra +Maintainer: Roberto Mier Escandón +Build-Depends: debhelper (>= 9), + dh-golang, + golang-1.10-go, + rsync +Standards-Version: 3.9.6 +Homepage: https://github.com/mikefarah/yq.git +Vcs-Browser: https://github.com/mikefarah/yq.git +Vcs-Git: https://github.com/mikefarah/yq.git + +Package: yq +Architecture: all +Built-Using: ${misc:Built-Using} +Depends: ${shlibs:Depends}, + ${misc:Depends} +Description: + a lightweight and portable command-line YAML processor + . + The aim of the project is to be the [jq](https://github.com/stedolan/jq) or sed of yaml files. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..cc9e1114 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,7 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: yq +Source: https://github.com/mikefarah/yq.git + +Files: * +Copyright: 2017 Mike Farah Ltd. All rights reserved +License: Proprietary \ No newline at end of file diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 00000000..cec628c7 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,2 @@ +[DEFAULT] +pristine-tar = True diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..9f370018 --- /dev/null +++ b/debian/rules @@ -0,0 +1,59 @@ +#!/usr/bin/make -f +# +# Copyright (C) 2018 Roberto Mier Escandón +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +PROJECT := yq +OWNER := mikefarah +REPO := github.com +GOVERSION := 1.10 +export DH_OPTIONS +export DH_GOPKG := ${REPO}/${OWNER}/${PROJECT} +export GOROOT := /usr/lib/go-${GOVERSION} +export GOPATH := ${CURDIR}/_build +export GOBIN := ${GOPATH}/bin +export PATH := ${GOROOT}/bin:${GOBIN}:${PATH} +BLDPATH := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +SRCDIR := ${CURDIR}/_build/src/${DH_GOPKG} +DESTDIR := ${CURDIR}/debian/${PROJECT} +BINDIR := /usr/bin +ASSETSDIR := /usr/share/${PROJECT} + +%: + dh $@ --buildsystem=golang --with=golang + +override_dh_auto_build: + mkdir -p ${SRCDIR} + mkdir -p ${GOBIN} + # copy project to local srcdir to build from there + rsync -avz --progress --exclude=obj-${BLDPATH} --exclude=debian . $(SRCDIR) + # build go code + (cd ${SRCDIR} && go install ./...) + +override_dh_auto_test: + (cd ${SRCDIR} && go test -v ./...) + +override_dh_auto_install: + mkdir -p ${DESTDIR}/${BINDIR} + mkdir -p ${DESTDIR}/${ASSETSDIR} + cp ${CURDIR}/_build/bin/yq ${DESTDIR}/${BINDIR} + cp -rf ${SRCDIR}/LICENSE ${DESTDIR}/${ASSETSDIR} + cp -rf ${SRCDIR}/README.md ${DESTDIR}/${PLUGINSDIR} + chmod a+x ${DESTDIR}/${BINDIR}/yq + +override_dh_auto_clean: + dh_clean + rm -rf ${CURDIR}/obj-${BLDPATH} + rm -rf ${CURDIR}/_build 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)