From 914267a94d253c23c16cb2b64a6dc246b2f6a311 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 19 Feb 2019 12:31:18 +0100 Subject: [PATCH] move to buildpackage Signed-off-by: Thomas Lamprecht --- Makefile | 34 ++++++++++++---------------- changelog.Debian => debian/changelog | 0 debian/compat | 1 + control.in => debian/control | 12 ++++++---- copyright => debian/copyright | 0 debian/docs | 1 + debian/rules | 7 ++++++ debian/source/format | 1 + 8 files changed, 31 insertions(+), 25 deletions(-) rename changelog.Debian => debian/changelog (100%) create mode 100644 debian/compat rename control.in => debian/control (59%) rename copyright => debian/copyright (100%) create mode 100644 debian/docs create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/Makefile b/Makefile index 52b16bf..9522ea4 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,16 @@ PACKAGERELEASE=5 PKGREL=${VERSION}-${PACKAGERELEASE} DEB=${PACKAGE}_${PKGREL}_all.deb -GITVERSION:=$(shell cat .git/refs/heads/master) +GITVERSION:=$(shell git rev-parse HEAD) -all: ${DEB} +BUILDDIR ?= ${PACKAGE}-${VERSION} + +all: + +${BUILDDIR}: debian + rm -rf ${BUILDDIR} + rsync -a * ${BUILDDIR} + echo "git clone git://git.proxmox.com/git/pve-jslint.git\\ngit checkout $(GITVERSION)" > ${BUILDDIR}/debian/SOURCE .PHONY: dinstall dinstall: ${DEB} @@ -14,21 +21,8 @@ dinstall: ${DEB} .PHONY: deb deb: ${DEB} -${DEB}: - make clean - rm -rf dest - mkdir dest - make DESTDIR=`pwd`/dest install - mkdir dest/DEBIAN - sed -e 's/@PKGREL@/${PKGREL}/' dest/DEBIAN/control - mkdir -p dest/usr/share/doc/${PACKAGE} - echo "git clone git://git.proxmox.com/git/pve-jslint.git\\ngit checkout ${GITVERSION}" > dest/usr/share/doc/${PACKAGE}/SOURCE - install -m 0644 copyright dest/usr/share/doc/${PACKAGE} - install -m 0644 changelog.Debian dest/usr/share/doc/${PACKAGE} - gzip -n --best dest/usr/share/doc/${PACKAGE}/changelog.Debian - fakeroot dpkg-deb --build dest - mv dest.deb ${DEB} - rm -rf dest +${DEB}: ${BUILDDIR} + cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc lintian ${DEB} rhinoed_jslint.js: jslint.js rhino.js @@ -36,9 +30,9 @@ rhinoed_jslint.js: jslint.js rhino.js mv $@.tmp $@ install: rhinoed_jslint.js jslint - mkdir -p ${DESTDIR}/usr/share/${PACKAGE} + install -d -m 0755 ${DESTDIR}/usr/share/${PACKAGE} install -m 0644 rhinoed_jslint.js ${DESTDIR}/usr/share/${PACKAGE}/rhinoed_jslint.js - mkdir -p ${DESTDIR}/usr/bin + install -d -m 0755 ${DESTDIR}/usr/bin install -m 0755 jslint ${DESTDIR}/usr/bin jslint.js download: @@ -49,7 +43,7 @@ distclean: clean .PHONY: clean clean: - rm -rf *~ dest control rhinoed_jslint.js *.deb + rm -rf *~ ${BUILDDIR} rhinoed_jslint.js *.deb *.changes *.buildinfo .PHONY: upload upload: ${DEB} diff --git a/changelog.Debian b/debian/changelog similarity index 100% rename from changelog.Debian rename to debian/changelog diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/control.in b/debian/control similarity index 59% rename from control.in rename to debian/control index c89fd20..0c70b3e 100644 --- a/control.in +++ b/debian/control @@ -1,10 +1,12 @@ -Package: pve-jslint -Version: @PKGREL@ +Source: pve-jslint Section: devel Priority: optional +Maintainer: Proxmox Support Team +Standards-Version: 3.9.8 + +Package: pve-jslint Architecture: all Depends: rhino -Maintainer: Proxmox Support Team Description: JSLint for Proxmox Virtual Environment development - This package contains a version of jslint used to develop the - Proxmox Virtual Environment GUI. + This package contains a version of jslint used to develop the Proxmox Virtual + Environment GUI. diff --git a/copyright b/debian/copyright similarity index 100% rename from copyright rename to debian/copyright diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..8696672 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +debian/SOURCE diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..f00dbc2 --- /dev/null +++ b/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + +%: + dh $@ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..d3827e7 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +1.0 -- 2.39.5