From f1626066e26b36586c5da4e6f04b2dcdf6889a90 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 28 Mar 2019 09:12:59 +0100 Subject: [PATCH] cleanup buildsys and add dsc target Signed-off-by: Thomas Lamprecht --- Makefile | 43 ++++++++++++++++++-------------------- debian/control | 2 ++ jslint => src/jslint | 0 jslint.js => src/jslint.js | 0 rhino.js => src/rhino.js | 0 5 files changed, 22 insertions(+), 23 deletions(-) rename jslint => src/jslint (100%) rename jslint.js => src/jslint.js (100%) rename rhino.js => src/rhino.js (100%) diff --git a/Makefile b/Makefile index 9522ea4..9011ff5 100644 --- a/Makefile +++ b/Makefile @@ -3,47 +3,44 @@ VERSION=1.0 PACKAGERELEASE=5 PKGREL=${VERSION}-${PACKAGERELEASE} -DEB=${PACKAGE}_${PKGREL}_all.deb -GITVERSION:=$(shell git rev-parse HEAD) +DEB=${PACKAGE}_${PKGREL}_all.deb +DSC=${PACKAGE}_${PKGREL}.dsc + +GITVERSION:=$(shell git rev-parse HEAD) BUILDDIR ?= ${PACKAGE}-${VERSION} -all: +all: ${DEB} -${BUILDDIR}: debian +${BUILDDIR}: src debian rm -rf ${BUILDDIR} - rsync -a * ${BUILDDIR} + rsync -a src/ debian ${BUILDDIR} echo "git clone git://git.proxmox.com/git/pve-jslint.git\\ngit checkout $(GITVERSION)" > ${BUILDDIR}/debian/SOURCE -.PHONY: dinstall -dinstall: ${DEB} - dpkg -i ${DEB} - .PHONY: deb deb: ${DEB} ${DEB}: ${BUILDDIR} cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc lintian ${DEB} -rhinoed_jslint.js: jslint.js rhino.js - cat jslint.js rhino.js >$@.tmp - mv $@.tmp $@ +.PHONY: dsc +dsc: ${DSC} +${DSC}: ${BUILDDIR} + cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d -nc + lintian ${DSC} -install: rhinoed_jslint.js jslint - install -d -m 0755 ${DESTDIR}/usr/share/${PACKAGE} - install -m 0644 rhinoed_jslint.js ${DESTDIR}/usr/share/${PACKAGE}/rhinoed_jslint.js - install -d -m 0755 ${DESTDIR}/usr/bin - install -m 0755 jslint ${DESTDIR}/usr/bin +.PHONY: dinstall +dinstall: ${DEB} + dpkg -i ${DEB} -jslint.js download: - wget -O jslint.js http://jslint.com/jslint.js +.PHONY: download +src/jslint.js download: + wget -O src/jslint.js http://jslint.com/jslint.js -.PHONY: distclean +.PHONY: distclean clean distclean: clean - -.PHONY: clean clean: - rm -rf *~ ${BUILDDIR} rhinoed_jslint.js *.deb *.changes *.buildinfo + rm -rf *~ ${BUILDDIR} rhinoed_jslint.js *.deb *.dsc *.tar.gz *.changes *.buildinfo .PHONY: upload upload: ${DEB} diff --git a/debian/control b/debian/control index 0c70b3e..32af4b0 100644 --- a/debian/control +++ b/debian/control @@ -2,6 +2,8 @@ Source: pve-jslint Section: devel Priority: optional Maintainer: Proxmox Support Team +Build-Depends: debhelper (>= 10~), + rsync Standards-Version: 3.9.8 Package: pve-jslint diff --git a/jslint b/src/jslint similarity index 100% rename from jslint rename to src/jslint diff --git a/jslint.js b/src/jslint.js similarity index 100% rename from jslint.js rename to src/jslint.js diff --git a/rhino.js b/src/rhino.js similarity index 100% rename from rhino.js rename to src/rhino.js