Discussion:
[pve-devel] [PATCH extjs 0/7] build cleanup / source package
Fabian Grünbichler
2018-12-05 10:34:21 UTC
Permalink
Fabian Grünbichler (7):
build: prepare refactoring
build: move lintian-overrides to debian/
d/source/format: add explicit format
build: add dsc target
build: install via d/*.install
d/rules: chmod +x
debian: switch to DH 10

Makefile | 56 ++++++++++++++-------------------
debian/compat | 2 +-
debian/control | 2 +-
debian/libjs-extjs.install | 7 +++++
debian/lintian-overrides | 1 +
debian/rules | 0
debian/source/format | 1 +
debian/source/lintian-overrides | 2 ++
8 files changed, 36 insertions(+), 35 deletions(-)
create mode 100644 debian/libjs-extjs.install
create mode 100644 debian/lintian-overrides
mode change 100644 => 100755 debian/rules
create mode 100644 debian/source/format
create mode 100644 debian/source/lintian-overrides
--
2.19.2
Fabian Grünbichler
2018-12-05 10:34:22 UTC
Permalink
Signed-off-by: Fabian Grünbichler <***@proxmox.com>
---
Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index b5b8cb5..5ac1082 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,10 @@ all: ${EXTDATA}
deb: ${DEB}
${DEB}:
rm -rf build
- rsync -a * build
+ mkdir build
+ rsync -a debian/ build/debian
+ rsync -a extjs/ build/extjs
+ cp Makefile build/
cp extjs/licenses/license.txt build/debian/copyright
cd build; dpkg-buildpackage -b -us -uc
lintian -X copyright-file ${DEB}
--
2.19.2
Fabian Grünbichler
2018-12-05 10:34:24 UTC
Permalink
Signed-off-by: Fabian Grünbichler <***@proxmox.com>
---
debian/source/format | 1 +
1 file changed, 1 insertion(+)
create mode 100644 debian/source/format

diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
--
2.19.2
Fabian Grünbichler
2018-12-05 10:34:23 UTC
Permalink
Signed-off-by: Fabian Grünbichler <***@proxmox.com>
---
Makefile | 2 +-
debian/lintian-overrides | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 debian/lintian-overrides

diff --git a/Makefile b/Makefile
index 5ac1082..c92b30b 100644
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@ ${DEB}:
cp Makefile build/
cp extjs/licenses/license.txt build/debian/copyright
cd build; dpkg-buildpackage -b -us -uc
- lintian -X copyright-file ${DEB}
+ lintian $@

.PHONY: install
install: ${EXTDATA}
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
new file mode 100644
index 0000000..5dc4509
--- /dev/null
+++ b/debian/lintian-overrides
@@ -0,0 +1 @@
+libjs-extjs: copyright-should-refer-to-common-license-file-for-gpl
--
2.19.2
Fabian Grünbichler
2018-12-05 10:34:27 UTC
Permalink
Signed-off-by: Fabian Grünbichler <***@proxmox.com>
---
debian/rules | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 debian/rules

diff --git a/debian/rules b/debian/rules
old mode 100644
new mode 100755
--
2.19.2
Fabian Grünbichler
2018-12-05 10:34:28 UTC
Permalink
Signed-off-by: Fabian Grünbichler <***@proxmox.com>
---
debian/compat | 2 +-
debian/control | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/compat b/debian/compat
index ec63514..f599e28 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/control b/debian/control
index e0cbfdf..ce5c2f6 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: libjs-extjs
Section: web
Priority: optional
Maintainer: Proxmox Support Team <***@proxmox.com>
-Build-Depends: debhelper (>= 9)
+Build-Depends: debhelper (>= 10~)
Standards-Version: 3.9.4
Homepage: https://www.sencha.com/
--
2.19.2
Fabian Grünbichler
2018-12-05 10:34:25 UTC
Permalink
to build a source package

Signed-off-by: Fabian Grünbichler <***@proxmox.com>
---
Makefile | 32 +++++++++++++++++++++++---------
debian/source/lintian-overrides | 2 ++
2 files changed, 25 insertions(+), 9 deletions(-)
create mode 100644 debian/source/lintian-overrides

diff --git a/Makefile b/Makefile
index c92b30b..b4ba1c1 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,10 @@ PACKAGE=libjs-extjs
PKGVER=6.0.1
PKGREL=2

+BUILD_DIR=${PACKAGE}-${PKGVER}
+
DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
+DSC=${PACKAGE}_${PKGVER}-${PKGREL}.dsc

# EXTJSDIR=ext-6.0.1
# wget http://cdn.sencha.com/ext/gpl/ext-6.0.1-gpl.zip
@@ -24,16 +27,27 @@ WWWEXT6DIR=${DESTDIR}/usr/share/javascript/extjs

all: ${EXTDATA}

+${BUILD_DIR}: debian extjs
+ rm -rf $@ $@.tmp
+ mkdir $@.tmp
+ rsync -a debian/ $@.tmp/debian
+ mkdir $@.tmp/extjs
+ rsync -a extjs/build/ $@.tmp/extjs/build
+ cp Makefile $@.tmp/
+ cp extjs/licenses/license.txt $@.tmp/debian/copyright
+ mv $@.tmp $@
+
.PHONY: deb
deb: ${DEB}
-${DEB}:
- rm -rf build
- mkdir build
- rsync -a debian/ build/debian
- rsync -a extjs/ build/extjs
- cp Makefile build/
- cp extjs/licenses/license.txt build/debian/copyright
- cd build; dpkg-buildpackage -b -us -uc
+${DEB}: ${BUILD_DIR}
+ cd ${BUILD_DIR}; dpkg-buildpackage -b -us -uc
+ lintian $@
+
+.PHONY: dsc
+dsc: ${DSC}
+${DSC}: ${BUILD_DIR}
+ cd ${BUILD_DIR}; tar czf ../${PACKAGE}_${PKGVER}.orig.tar.gz *
+ cd ${BUILD_DIR}; dpkg-buildpackage -S -us -uc -nc -d
lintian $@

.PHONY: install
@@ -53,7 +67,7 @@ distclean: clean

.PHONY: clean
clean:
- rm -rf ./build *.deb *.changes *.buildinfo
+ rm -rf ${BUILD_DIR} ${BUILD_DIR}.tmp *.deb *.changes *.buildinfo *.orig.tar.* *.dsc *.debian.tar.*
find . -name '*~' -exec rm {} ';'

.PHONY: dinstall
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..9059b79
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1,2 @@
+# minified files that we want to ship
+libjs-extjs source: source-is-missing extjs/build/*
--
2.19.2
Fabian Grünbichler
2018-12-05 10:34:26 UTC
Permalink
since all the files are static anyway

Signed-off-by: Fabian Grünbichler <***@proxmox.com>
---
Makefile | 29 +----------------------------
debian/libjs-extjs.install | 7 +++++++
2 files changed, 8 insertions(+), 28 deletions(-)
create mode 100644 debian/libjs-extjs.install

diff --git a/Makefile b/Makefile
index b4ba1c1..1a2106b 100644
--- a/Makefile
+++ b/Makefile
@@ -7,25 +7,7 @@ BUILD_DIR=${PACKAGE}-${PKGVER}
DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
DSC=${PACKAGE}_${PKGVER}-${PKGREL}.dsc

-# EXTJSDIR=ext-6.0.1
-# wget http://cdn.sencha.com/ext/gpl/ext-6.0.1-gpl.zip
-# unzip ext-6.0.1-gpl.zip
-
-EXTDATA= \
- extjs/build/ext-all.js \
- extjs/build/ext-all-debug.js \
- extjs/build/packages/charts/classic/charts.js \
- extjs/build/packages/charts/classic/charts-debug.js \
-
-EXT_THEME= \
- extjs/build/classic/theme-crisp \
- extjs/build/packages/charts/classic/crisp \
-
-DESTDIR=
-
-WWWEXT6DIR=${DESTDIR}/usr/share/javascript/extjs
-
-all: ${EXTDATA}
+all: deb

${BUILD_DIR}: debian extjs
rm -rf $@ $@.tmp
@@ -33,7 +15,6 @@ ${BUILD_DIR}: debian extjs
rsync -a debian/ $@.tmp/debian
mkdir $@.tmp/extjs
rsync -a extjs/build/ $@.tmp/extjs/build
- cp Makefile $@.tmp/
cp extjs/licenses/license.txt $@.tmp/debian/copyright
mv $@.tmp $@

@@ -50,14 +31,6 @@ ${DSC}: ${BUILD_DIR}
cd ${BUILD_DIR}; dpkg-buildpackage -S -us -uc -nc -d
lintian $@

-.PHONY: install
-install: ${EXTDATA}
- install -d ${WWWEXT6DIR}
- install -m 0644 ${EXTDATA} ${WWWEXT6DIR}
- cp -a extjs/build/classic/locale ${WWWEXT6DIR}
- cp -a ${EXT_THEME} ${WWWEXT6DIR}
- chown -R www-data:www-data ${WWWEXT6DIR}
-
.PHONY: upload
upload: ${DEB}
tar cf - ${DEB} | ssh ***@repo.proxmox.com -- upload --product pve,pmg --dist stretch
diff --git a/debian/libjs-extjs.install b/debian/libjs-extjs.install
new file mode 100644
index 0000000..937e2e4
--- /dev/null
+++ b/debian/libjs-extjs.install
@@ -0,0 +1,7 @@
+extjs/build/classic/locale /usr/share/javascript/extjs
+extjs/build/classic/theme-crisp /usr/share/javascript/extjs
+extjs/build/ext-all-debug.js /usr/share/javascript/extjs
+extjs/build/ext-all.js /usr/share/javascript/extjs
+extjs/build/packages/charts/classic/charts-debug.js /usr/share/javascript/extjs
+extjs/build/packages/charts/classic/charts.js /usr/share/javascript/extjs
+extjs/build/packages/charts/classic/crisp /usr/share/javascript/extjs
--
2.19.2
Thomas Lamprecht
2018-12-05 12:17:38 UTC
Permalink
Post by Fabian Grünbichler
build: prepare refactoring
build: move lintian-overrides to debian/
d/source/format: add explicit format
build: add dsc target
build: install via d/*.install
d/rules: chmod +x
debian: switch to DH 10
Makefile | 56 ++++++++++++++-------------------
debian/compat | 2 +-
debian/control | 2 +-
debian/libjs-extjs.install | 7 +++++
debian/lintian-overrides | 1 +
debian/rules | 0
debian/source/format | 1 +
debian/source/lintian-overrides | 2 ++
8 files changed, 36 insertions(+), 35 deletions(-)
create mode 100644 debian/libjs-extjs.install
create mode 100644 debian/lintian-overrides
mode change 100644 => 100755 debian/rules
create mode 100644 debian/source/format
create mode 100644 debian/source/lintian-overrides
applied, with a fixup removing the "-nc" (no clean) option for the
dsc build, as else building it after a .deb was already made fails
as talked off-list. Thanks!

Loading...