Fixing a lot of bugs of packages.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adsooi 2021-10-01 16:36:58 +02:00
parent 9833e7ae65
commit f5fee9ae35
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
6 changed files with 58 additions and 18 deletions

View file

@ -1 +0,0 @@
11

View file

@ -1 +0,0 @@
logarithmplotter usr/bin/

View file

@ -23,12 +23,12 @@
],
"modules": [
"python3-pyside2.json",
{
"name": "LogarithmPlotter",
"buildsystem": "simple",
"config-opts": ["no-debuginfo-compression"],
"build-commands": [
"rm -rf .git",
"PREFIX=\"/app/share\" FLATPAK_INSTALL=1 python3 setup.py install --prefix=/app"
],
"sources": [

24
linux/sign-deb.sh Executable file
View file

@ -0,0 +1,24 @@
#!/bin/bash
# This script is used to sign the LogarithmPlotter deb directly from it's DSC file.
# Adapted from https://github.com/astraw/stdeb/issues/181
PPA_ARCHIVE="ppa:ad5001/logarithmplotter"
cd ../deb_dist
# create a temporary folder
mkdir tmp -p
cd tmp
rm -rf *
# DSC file variables
dsc_file="$(find ../ -regextype sed -regex ".*/*\-ppa[0-9]*.dsc" | cut -c 4-)"
source_package_name="$(echo $dsc_file | cut -c -$(expr ${#dsc_file} - 4))"
# extract and sign the files
dpkg-source -x "../$dsc_file"
cd "$(find . -type d | head -n 2 | tail -n 1 | cut -c 3-)" # go to the (only) directory.
debuild -S -sa -k"mail@ad5001.eu"
# upload package to my PPA
dput $PPA_ARCHIVE "../${source_package_name}_source.changes"

View file

@ -1,6 +1,8 @@
#!/bin/bash
python3 setup.py --command-packages=stdeb.command sdist_dsc --package logarithmplotter --copyright-file linux/debian/copyright --suite hirsute --recommends "$(cat linux/debian/recommends)" --depends "$(cat linux/debian/depends)" --section science bdist_deb
python3 setup.py --remove-git-version --command-packages=stdeb.command sdist_dsc \
--package logarithmplotter --copyright-file linux/debian/copyright --suite hirsute --depends3 "$(cat linux/debian/depends)" --section science \
--upstream-version-suffix "-patch1" --debian-version "ppa1" bdist_deb
# Flatpak building
FLATPAK_BUILDER=$(which flatpak-builder)

View file

@ -20,8 +20,16 @@ import setuptools
import os
import sys
print(sys.argv)
current_dir = os.path.realpath(os.path.dirname(os.path.realpath(__file__)))
if "PREFIX" not in os.environ and sys.platform == 'linux':
from getopt import getopt
optlist, args = getopt(sys.argv, '', ['prefix=', 'root='])
for arg,value in optlist:
if arg == "prefix":
os.environ["PREFIX"] = value
if "PREFIX" not in os.environ and sys.platform == 'linux':
if "XDG_DATA_HOME" in os.environ:
os.environ["PREFIX"] = os.environ["XDG_DATA_HOME"]
@ -37,6 +45,10 @@ if "PREFIX" not in os.environ and sys.platform == 'linux':
from LogarithmPlotter import __VERSION__ as pkg_version
if "--remove-git-version" in sys.argv:
pkg_version = pkg_version.split(".dev0")[0]
sys.argv.remove("--remove-git-version")
CLASSIFIERS = """
Environment :: Graphic
Environment :: X11 Applications :: Qt
@ -70,7 +82,11 @@ def package_data():
data_files = []
if sys.platform == 'linux':
data_files.append((os.environ["PREFIX"] + '/applications/', ['linux/logarithmplotter.desktop']))
data_files.append(('share/applications/', ['linux/logarithmplotter.desktop']))
data_files.append(('share/mime/packages/', ['linux/x-logarithm-plot.xml']))
data_files.append(('share/icons/hicolor/scalable/mimetypes/', ['linux/application-x-logarithm-plot.svg']))
data_files.append(('share/icons/hicolor/scalable/apps/', ['logplotter.svg']))
"""data_files.append((os.environ["PREFIX"] + '/applications/', ['linux/logarithmplotter.desktop']))
data_files.append((os.environ["PREFIX"] + '/mime/packages/', ['linux/x-logarithm-plot.xml']))
data_files.append((os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/', ['linux/application-x-logarithm-plot.svg']))
data_files.append((os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/', ['logplotter.svg']))
@ -94,7 +110,7 @@ if sys.platform == 'linux':
os.remove(os.environ["PREFIX"] + '/applications/logarithmplotter.desktop')
os.remove(os.environ["PREFIX"] + '/mime/packages/x-logarithm-plot.xml')
os.remove(os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/application-x-logarithm-plot.svg')
os.remove(os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/logplotter.svg')
os.remove(os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/logplotter.svg')"""
setuptools.setup(
install_requires=([] if "FLATPAK_INSTALL" in os.environ else ["PySide2"]),
@ -111,7 +127,7 @@ setuptools.setup(
author_email='mail@ad5001.eu',
license=('GPLv3'),
url='https://apps.ad5001.eu/logarithmplotter',
url='https://apps.ad5001.eu/logarithmplotter/',
classifiers=CLASSIFIERS,
zip_safe=False,