forked from s3lph/matemat
Debian package quality assurance (lintian)
This commit is contained in:
parent
3c7e33e9fa
commit
7479c7d9f1
6 changed files with 18 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
image: s3lph/matemat-ci:20181103-01
|
image: s3lph/matemat-ci:20181107-01
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
|
@ -62,25 +62,28 @@ build_wheel:
|
||||||
build_debian:
|
build_debian:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- echo -n > package/debian/matemat/DEBIAN/changelog
|
- echo -n > package/debian/matemat/usr/share/doc/matemat/changelog
|
||||||
- |
|
- |
|
||||||
for version in "$(cat CHANGELOG.md | grep '<!-- BEGIN CHANGES' | cut -d ' ' -f 4)"; do
|
for version in "$(cat CHANGELOG.md | grep '<!-- BEGIN CHANGES' | cut -d ' ' -f 4)"; do
|
||||||
echo "matemat (${version}-1); urgency=medium\n" >> package/debian/matemat/DEBIAN/changelog
|
echo "matemat (${version}-1); urgency=medium\n" >> package/debian/matemat/usr/share/doc/matemat/changelog
|
||||||
cat CHANGELOG.md | grep -A 1000 "<"'!'"-- BEGIN CHANGES ${version} -->" | grep -B 1000 "<"'!'"-- END CHANGES ${version} -->" | tail -n +2 | head -n -1 | sed -re 's/^-/ */g' >> package/debian/matemat/DEBIAN/changelog
|
cat CHANGELOG.md | grep -A 1000 "<"'!'"-- BEGIN CHANGES ${version} -->" | grep -B 1000 "<"'!'"-- END CHANGES ${version} -->" | tail -n +2 | head -n -1 | sed -re 's/^-/ */g' >> package/debian/matemat/usr/share/doc/matemat/changelog
|
||||||
echo "\n -- ${PACKAGE_AUTHOR} $(date -R)\n" >> package/debian/matemat/DEBIAN/changelog
|
echo "\n -- ${PACKAGE_AUTHOR} $(date -R)\n" >> package/debian/matemat/usr/share/doc/matemat/changelog
|
||||||
done
|
done
|
||||||
|
- gzip -9 package/debian/matemat/usr/share/doc/matemat/changelog
|
||||||
- cp -r static/ package/debian/matemat/usr/lib/matemat/static/
|
- cp -r static/ package/debian/matemat/usr/lib/matemat/static/
|
||||||
- cp -r templates/ package/debian/matemat/usr/lib/matemat/templates/
|
- cp -r templates/ package/debian/matemat/usr/lib/matemat/templates/
|
||||||
- python3.6 setup.py egg_info -d -b +master install --root=package/debian/matemat/ --prefix=/usr --optimize=1
|
- python3 setup.py egg_info install --root=package/debian/matemat/ --prefix=/usr --optimize=1
|
||||||
- export PYTHON_BIN=$(which python3)
|
- export PYTHON_BIN=$(which python3)
|
||||||
- cd package/debian
|
- cd package/debian
|
||||||
- chmod 0755 -R matemat/DEBIAN
|
- chmod 0755 -R matemat/DEBIAN
|
||||||
- mv matemat/usr/lib/python3.6/{site,dist}-packages
|
- mv matemat/usr/lib/python3/{site,dist}-packages
|
||||||
|
- find matemat/usr/lib/python3/dist-packages -name __pycache__ -exec rm -r {} \;
|
||||||
|
- find matemat/usr/lib/python3/dist-packages -name '*.pyc' -exec rm {} \;
|
||||||
- mv matemat/usr/bin/matemat matemat/usr/lib/matemat/matemat
|
- mv matemat/usr/bin/matemat matemat/usr/lib/matemat/matemat
|
||||||
- rm -rf matemat/usr/bin
|
- rm -rf matemat/usr/bin
|
||||||
- find . -type f -exec sed -re "s#${PYTHON_BIN}#/usr/bin/python3.6#g" -i {} \;
|
|
||||||
- dpkg-deb --build matemat
|
- dpkg-deb --build matemat
|
||||||
- mv matemat.deb "matemat_${MATEMAT_VERSION}-1_all.deb"
|
- mv matemat.deb "matemat_${MATEMAT_VERSION}-1_all.deb"
|
||||||
|
- lintian "matemat_${MATEMAT_VERSION}-1_all.deb"
|
||||||
- sha256sum *.deb > SHA256SUMS
|
- sha256sum *.deb > SHA256SUMS
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
|
|
1
package/debian/matemat/DEBIAN/conffiles
Normal file
1
package/debian/matemat/DEBIAN/conffiles
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/etc/matemat.conf
|
|
@ -2,10 +2,10 @@ Package: matemat
|
||||||
Version: 0.1
|
Version: 0.1
|
||||||
Maintainer: s3lph <account-gitlab-ideynizv@kernelpanic.lol>
|
Maintainer: s3lph <account-gitlab-ideynizv@kernelpanic.lol>
|
||||||
Section: web
|
Section: web
|
||||||
Priority: extra
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: python3 (>= 3.6), python3-jinja2, python3-magic, python3-pil
|
Depends: python3 (>= 3.6), python3-jinja2, python3-magic, python3-pil
|
||||||
Description: A soda machine stock-keeping webservice
|
Description: Soda machine stock-keeping webservice
|
||||||
A web service for automated stock-keeping of a soda machine written in Python.
|
A web service for automated stock-keeping of a soda machine written in Python.
|
||||||
It provides a touch-input-friendly user interface (as most input happens through the
|
It provides a touch-input-friendly user interface (as most input happens
|
||||||
soda machine's touch screen).
|
through the soda machine's touch screen).
|
||||||
|
|
|
@ -8,7 +8,7 @@ RUN sed -re 's/stretch/buster/g' -i /etc/apt/sources.list \
|
||||||
&& chown matemat:matemat -R /var/matemat/db \
|
&& chown matemat:matemat -R /var/matemat/db \
|
||||||
&& chown matemat:matemat -R /var/matemat/upload \
|
&& chown matemat:matemat -R /var/matemat/upload \
|
||||||
&& apt-get update -qy \
|
&& apt-get update -qy \
|
||||||
&& apt-get install -y --no-install-recommends file sudo openssh-client git docker.io build-essential \
|
&& apt-get install -y --no-install-recommends file sudo openssh-client git docker.io build-essential lintian \
|
||||||
&& python3.6 -m pip install coverage wheel pycodestyle mypy \
|
&& python3.6 -m pip install coverage wheel pycodestyle mypy \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue