Begin creation of debian package files
This commit is contained in:
parent
10412f52c5
commit
86d08bbdec
@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("mqtt-map")]
|
[assembly: AssemblyProduct("mqtt-map")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
[assembly: AssemblyCopyright("Copyright © 2018 - 06.03.2019")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
@ -32,5 +32,8 @@ using System.Runtime.InteropServices;
|
|||||||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
// übernehmen, indem Sie "*" eingeben:
|
// übernehmen, indem Sie "*" eingeben:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.1.0.0")]
|
[assembly: AssemblyVersion("1.1.1")]
|
||||||
[assembly: AssemblyFileVersion("1.1.0.0")]
|
[assembly: AssemblyFileVersion("1.1.1")]
|
||||||
|
/*
|
||||||
|
* 1.1.1 Add Debian package config
|
||||||
|
*/
|
9
mqtt-map/dpkg/control
Normal file
9
mqtt-map/dpkg/control
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
Package: loramap
|
||||||
|
Version: x.x-x
|
||||||
|
Section: base
|
||||||
|
Priority: optional
|
||||||
|
Architecture: any
|
||||||
|
Depends: mono-runtime (>= 5.18), libmono-posix4.0-cil (>= 5.18)
|
||||||
|
Maintainer: BlubbFish <dev@blubbfish.net>
|
||||||
|
Description: Lora-Map
|
||||||
|
Lora-Map shows a Map to control the Lora Tracker
|
2
mqtt-map/dpkg/create-Builds.bat
Normal file
2
mqtt-map/dpkg/create-Builds.bat
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
bash.exe -c "./make-deb.sh armhf"
|
||||||
|
pause
|
10
mqtt-map/dpkg/loramap-logrotate
Normal file
10
mqtt-map/dpkg/loramap-logrotate
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/var/log/loramap.log {
|
||||||
|
compress
|
||||||
|
copytruncate
|
||||||
|
daily
|
||||||
|
delaycompress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
rotate 4
|
||||||
|
size=10M
|
||||||
|
}
|
20
mqtt-map/dpkg/loramap.service
Normal file
20
mqtt-map/dpkg/loramap.service
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# If you modify this, please also make sure to edit init.sh
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Lora-Map
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=root
|
||||||
|
Group=root
|
||||||
|
WorkingDirectory=/usr/local/bin/loramap
|
||||||
|
ExecStart=/usr/bin/mono /usr/local/bin/loramap/Lora-Map.exe
|
||||||
|
KillMode=control-group
|
||||||
|
TimeoutStopSec=5
|
||||||
|
Restart=on-failure
|
||||||
|
StandardOutput=null
|
||||||
|
StandardError=syslog
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Alias=lorabot.service
|
51
mqtt-map/dpkg/make-deb.sh
Normal file
51
mqtt-map/dpkg/make-deb.sh
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
HOMEDIR=$HOME
|
||||||
|
ROOT="$HOMEDIR/deb"
|
||||||
|
OUTPUT="../bin/Release"
|
||||||
|
|
||||||
|
EXEC="$ROOT/usr/local/bin/loramap"
|
||||||
|
CONFIG="$ROOT/etc/loramap"
|
||||||
|
SYSTEMD="$ROOT/lib/systemd/system"
|
||||||
|
LOGROTATE="$ROOT/etc/logrotate.d"
|
||||||
|
|
||||||
|
DEBIAN="$ROOT/DEBIAN"
|
||||||
|
VMAJOR=$(grep -e "^\[assembly: AssemblyVersion(\"" ../Properties/AssemblyInfo.cs | cut -d'"' -f 2 | cut -d'.' -f 1)
|
||||||
|
VMINOR=$(grep -e "^\[assembly: AssemblyVersion(\"" ../Properties/AssemblyInfo.cs | cut -d'"' -f 2 | cut -d'.' -f 2)
|
||||||
|
VBUILD=$(grep -e "^\[assembly: AssemblyVersion(\"" ../Properties/AssemblyInfo.cs | cut -d'"' -f 2 | cut -d'.' -f 3)
|
||||||
|
ARCHT=$1
|
||||||
|
|
||||||
|
mkdir -p $EXEC
|
||||||
|
mkdir -p $CONFIG
|
||||||
|
mkdir -p $DEBIAN
|
||||||
|
mkdir -p $SYSTEMD
|
||||||
|
mkdir -p $LOGROTATE
|
||||||
|
|
||||||
|
cp control $DEBIAN
|
||||||
|
cp preinst $DEBIAN
|
||||||
|
cp postinst $DEBIAN
|
||||||
|
cp prerm $DEBIAN
|
||||||
|
sed -i s/Version:\ x\.x-x/"Version: $VMAJOR.$VMINOR-$VBUILD"/ $DEBIAN/control
|
||||||
|
sed -i s/Architecture:\ any/"Architecture: $ARCHT"/ $DEBIAN/control
|
||||||
|
chmod 755 $DEBIAN -R
|
||||||
|
|
||||||
|
cp loramap.service $SYSTEMD
|
||||||
|
chmod 644 $SYSTEMD/loramap.service
|
||||||
|
|
||||||
|
cp $OUTPUT/*.exe $EXEC/
|
||||||
|
#cp $OUTPUT/gpio.2.44 $EXEC/
|
||||||
|
#cp $OUTPUT/libwiringPi.so.2.44 $EXEC/
|
||||||
|
find $OUTPUT -name \*.dll -exec cp {} $EXEC/ \;
|
||||||
|
chmod 644 $EXEC/*
|
||||||
|
chmod 755 $EXEC
|
||||||
|
|
||||||
|
cp $OUTPUT/config-example/* $CONFIG
|
||||||
|
chmod 644 $CONFIG/*
|
||||||
|
chmod 755 $CONFIG
|
||||||
|
|
||||||
|
cp loramap-logrotate $LOGROTATE/loramap
|
||||||
|
chmod 644 $LOGROTATE/*
|
||||||
|
|
||||||
|
dpkg-deb --build $ROOT
|
||||||
|
mv $HOMEDIR/deb.deb ../../../Builds/"$ARCHT-loramap_$VMAJOR.$VMINOR-$VBUILD.deb"
|
||||||
|
rm $HOMEDIR/deb -r
|
9
mqtt-map/dpkg/postinst
Normal file
9
mqtt-map/dpkg/postinst
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
systemctl enable loramap
|
||||||
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
if [ -f /tmp/loramap_service_runner ]; then
|
||||||
|
service loramap start
|
||||||
|
rm /tmp/loramap_service_runner
|
||||||
|
fi
|
2
mqtt-map/dpkg/preinst
Normal file
2
mqtt-map/dpkg/preinst
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
7
mqtt-map/dpkg/prerm
Normal file
7
mqtt-map/dpkg/prerm
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ $(systemctl is-active loramap || true) == "active" ]]
|
||||||
|
then
|
||||||
|
touch /tmp/loramap_service_runner
|
||||||
|
service loramap stop
|
||||||
|
fi
|
@ -11,10 +11,17 @@ html, body {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#title {
|
#menucollumn {
|
||||||
|
width: 32px;
|
||||||
|
background-color: white;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 10000;
|
top: 10px;
|
||||||
margin-left: 110px;
|
bottom: 10px;
|
||||||
margin-top: 7px;
|
left: 10px;
|
||||||
color: #e23232;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#menucollumn .pos {
|
||||||
|
display: block;
|
||||||
|
height: 32px;
|
||||||
|
width: 32px;
|
||||||
|
}
|
@ -8,8 +8,10 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="css/global.css" />
|
<link rel="stylesheet" type="text/css" href="css/global.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 id="title">Mqtt-Map Monica</h1>
|
|
||||||
<div id="bigmap"></div>
|
<div id="bigmap"></div>
|
||||||
|
<div id="menucollumn">
|
||||||
|
<span class="pos"></span>
|
||||||
|
</div>
|
||||||
<script type="text/javascript" src="js/leaflet/leaflet.js"></script>
|
<script type="text/javascript" src="js/leaflet/leaflet.js"></script>
|
||||||
<script type="text/javascript" src="js/nav.js"></script>
|
<script type="text/javascript" src="js/nav.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user