mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 20:20:44 +00:00
Update Linux packaging files to fix lintian errors
This commit is contained in:
parent
fea497aca6
commit
c475f89d61
28
Building/Linux/copyright
Normal file
28
Building/Linux/copyright
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: OSCAR
|
||||||
|
|
||||||
|
Files: *
|
||||||
|
Copyright: 2011-2018 Mark Watkins
|
||||||
|
2019-2020 The OSCAR Team
|
||||||
|
License: GPL-3+
|
||||||
|
This program is free software; you can redistribute it
|
||||||
|
and/or modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
.
|
||||||
|
This program is distributed in the hope that it will be
|
||||||
|
useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. See the GNU General Public License for more
|
||||||
|
details.
|
||||||
|
.
|
||||||
|
You should have received a copy of the GNU General Public
|
||||||
|
License along with this package; if not, write to the Free
|
||||||
|
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301 USA
|
||||||
|
.
|
||||||
|
On Debian systems, the full text of the GNU General Public
|
||||||
|
License version 3 can be found in the file
|
||||||
|
`/usr/share/common-licenses/GPL-3'.
|
||||||
|
|
@ -36,11 +36,13 @@ echo Version: ${VERSION}
|
|||||||
|
|
||||||
# application name
|
# application name
|
||||||
appli_name="OSCAR"
|
appli_name="OSCAR"
|
||||||
|
package_name="oscar"
|
||||||
pre_inst="tst_user.sh"
|
pre_inst="tst_user.sh"
|
||||||
# build folder (absolute path is better)
|
# build folder (absolute path is better)
|
||||||
build_folder="/home/$USER/OSCAR/build"
|
build_folder="/home/$USER/OSCAR/build"
|
||||||
if [[ -n ${PRERELEASE} && -z ${RC} ]] ; then
|
if [[ -n ${PRERELEASE} && -z ${RC} ]] ; then
|
||||||
appli_name=${appli_name}-test
|
appli_name=${appli_name}-test
|
||||||
|
package_name=${package_name}-test
|
||||||
post_inst="ln_usrbin-test.sh"
|
post_inst="ln_usrbin-test.sh"
|
||||||
pre_rem="rm_usrbin-test.sh"
|
pre_rem="rm_usrbin-test.sh"
|
||||||
post_rem="clean_rm-test.sh"
|
post_rem="clean_rm-test.sh"
|
||||||
@ -98,7 +100,7 @@ mkdir ${temp_folder}/bin
|
|||||||
mkdir ${temp_folder}/share
|
mkdir ${temp_folder}/share
|
||||||
mkdir ${temp_folder}/share/${appli_name}
|
mkdir ${temp_folder}/share/${appli_name}
|
||||||
mkdir ${temp_folder}/share/doc
|
mkdir ${temp_folder}/share/doc
|
||||||
share_doc_folder="${temp_folder}/share/doc/${appli_name}"
|
share_doc_folder="${temp_folder}/share/doc/${package_name}"
|
||||||
mkdir ${share_doc_folder}
|
mkdir ${share_doc_folder}
|
||||||
mkdir ${temp_folder}/share/icons
|
mkdir ${temp_folder}/share/icons
|
||||||
mkdir ${temp_folder}/share/icons/hicolor
|
mkdir ${temp_folder}/share/icons/hicolor
|
||||||
@ -121,22 +123,29 @@ cp ./${appli_name}.png ${temp_folder}/share/icons/hicolor/48x48/apps/${appli_nam
|
|||||||
cp ./${appli_name}.svg ${temp_folder}/share/icons/hicolor/scalable/apps/${appli_name}.svg
|
cp ./${appli_name}.svg ${temp_folder}/share/icons/hicolor/scalable/apps/${appli_name}.svg
|
||||||
cp ./${appli_name}.desktop ${temp_folder}/share/applications/${appli_name}.desktop
|
cp ./${appli_name}.desktop ${temp_folder}/share/applications/${appli_name}.desktop
|
||||||
|
|
||||||
echo "Copyright 2019-2020 oscar-team.org <oscar@oscar-team.org>" > $share_doc_folder/copyright
|
#echo "Copyright 2019-2020 oscar-team.org <oscar@oscar-team.org>" > $share_doc_folder/copyright
|
||||||
|
#echo "Licensed under /usr/share/common-licenses/GPL-3" >> $share_doc_folder/copyright
|
||||||
|
cp ./copyright $share_doc_folder/copyright
|
||||||
|
|
||||||
changelog_file="$share_doc_folder/changelog"
|
changelog_file="./changelog"
|
||||||
|
|
||||||
#automatic changelog as a bad name
|
#automatic changelog as a bad name
|
||||||
# need to generate one and say fpm to use it instead of create one
|
# need to generate one and say fpm to use it instead of create one
|
||||||
# it seems that it needs both of them...
|
# it seems that it needs both of them...
|
||||||
|
|
||||||
# creation of the changelog.Debian.gz
|
# creation of the Debian changelog
|
||||||
echo "$appli_name (${VERSION}-${ITERATION}) whatever; urgency=medium" > $changelog_file
|
echo "$appli_name (${VERSION}-${ITERATION}) whatever; urgency=medium" > $changelog_file
|
||||||
echo "" >> $changelog_file
|
echo "" >> $changelog_file
|
||||||
echo " * Package created with FPM." >> $changelog_file
|
echo " * Package created with FPM." >> $changelog_file
|
||||||
echo "" >> $changelog_file
|
echo "" >> $changelog_file
|
||||||
echo " -- oscar-team.org <oscar@oscar-team.org>" >> $changelog_file
|
echo " * See the Release Notes under Help/About menu" >> $changelog_file
|
||||||
gzip --best $changelog_file
|
echo "" >> $changelog_file
|
||||||
description='Open Source CPAP Analysis Reporter\n<extended description needed to be filled with the right value>'
|
echo -n " -- oscar-team.org <oscar@oscar-team.org> " >> $changelog_file
|
||||||
|
date -Iminutes >> $changelog_file
|
||||||
|
cp $changelog_file $share_doc_folder/changelog
|
||||||
|
gzip --best $share_doc_folder/changelog
|
||||||
|
|
||||||
|
description='Open Source CPAP Analysis Reporter\nProvides graphical and statistical display of the CPAP stored data'
|
||||||
# trick for dummies : need to use echo -e to take care of \n (cariage return to slip description and extra one
|
# trick for dummies : need to use echo -e to take care of \n (cariage return to slip description and extra one
|
||||||
description=$(echo -e $description)
|
description=$(echo -e $description)
|
||||||
|
|
||||||
@ -154,7 +163,6 @@ fpm --input-type dir --output-type deb \
|
|||||||
--category misc \
|
--category misc \
|
||||||
--deb-priority optional \
|
--deb-priority optional \
|
||||||
--maintainer " -- oscar-team.org <oscar@oscar-team.org>" \
|
--maintainer " -- oscar-team.org <oscar@oscar-team.org>" \
|
||||||
--license GPL-v3 \
|
|
||||||
--vendor oscar-team.org \
|
--vendor oscar-team.org \
|
||||||
--description "$description" \
|
--description "$description" \
|
||||||
--url https://sleepfiles.com/OSCAR \
|
--url https://sleepfiles.com/OSCAR \
|
||||||
@ -162,7 +170,7 @@ fpm --input-type dir --output-type deb \
|
|||||||
--depends $dblPkg \
|
--depends $dblPkg \
|
||||||
--depends libpcre16-3 \
|
--depends libpcre16-3 \
|
||||||
--depends qttranslations5-l10n \
|
--depends qttranslations5-l10n \
|
||||||
--depends "libqt5core5a > $qtver" \
|
--depends "libqt5core5a > 5.9" \
|
||||||
--depends libqt5serialport5 \
|
--depends libqt5serialport5 \
|
||||||
--depends libqt5xml5 \
|
--depends libqt5xml5 \
|
||||||
--depends libqt5network5 \
|
--depends libqt5network5 \
|
||||||
|
@ -37,6 +37,4 @@ if [ -f "$file" ]; then
|
|||||||
rm $file
|
rm $file
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -x /usr/bin/update-menus ]; then update-menus; fi
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,6 +90,5 @@ if [ -f "$file" ]; then
|
|||||||
rm $file
|
rm $file
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -x /usr/bin/update-menus ]; then update-menus; fi
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
#set -e
|
set -e
|
||||||
#
|
#
|
||||||
#test USER (must be root) vs SUDO_USER (must be other than root but not empty)
|
#test USER (must be root) vs SUDO_USER (must be other than root but not empty)
|
||||||
#if [ "$USER" != "root" ] || [ "$SUDO_USER" = "root" ] || [ -z "$SUDO_USER" ]; then
|
if [ "$USER" != "root" ] || [ "$SUDO_USER" = "root" ] || [ -z "$SUDO_USER" ]; then
|
||||||
# echo "dpkg -i must be launched as normal user with sudo command. fatal error"
|
echo "Installation must be done as normal user with sudo command. fatal error"
|
||||||
# exit
|
exit
|
||||||
#fi
|
fi
|
||||||
# do nothing
|
# do nothing
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user