Updated Debian package
This commit is contained in:
parent
07cbc71aa2
commit
a17a60f914
13
build.sh
13
build.sh
|
@ -248,7 +248,7 @@ PackageTests()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp $outputFolder/*.dll $testPackageFolder
|
cp $outputFolder/*.dll $testPackageFolder
|
||||||
cp ./*.sh $testPackageFolder
|
cp ./test.sh $testPackageFolder
|
||||||
|
|
||||||
echo "Creating MDBs for tests"
|
echo "Creating MDBs for tests"
|
||||||
CreateMdbs $testPackageFolder
|
CreateMdbs $testPackageFolder
|
||||||
|
@ -284,12 +284,21 @@ CleanupWindowsPackage()
|
||||||
|
|
||||||
PublishArtifacts()
|
PublishArtifacts()
|
||||||
{
|
{
|
||||||
|
ProgressStart 'Publishing Artifacts'
|
||||||
|
|
||||||
|
# Tests
|
||||||
echo "##teamcity[publishArtifacts '_tests/** => tests.zip']"
|
echo "##teamcity[publishArtifacts '_tests/** => tests.zip']"
|
||||||
|
|
||||||
|
# Releases
|
||||||
echo "##teamcity[publishArtifacts '$outputFolder/** => Sonarr.$BRANCH.$BUILD_NUMBER.windows.zip!Sonarr']"
|
echo "##teamcity[publishArtifacts '$outputFolder/** => Sonarr.$BRANCH.$BUILD_NUMBER.windows.zip!Sonarr']"
|
||||||
echo "##teamcity[publishArtifacts '$outputFolderLinux/** => Sonarr.$BRANCH.$BUILD_NUMBER.linux.tar.gz!Sonarr']"
|
echo "##teamcity[publishArtifacts '$outputFolderLinux/** => Sonarr.$BRANCH.$BUILD_NUMBER.linux.tar.gz!Sonarr']"
|
||||||
echo "##teamcity[publishArtifacts '$outputFolderMacOS/** => Sonarr.$BRANCH.$BUILD_NUMBER.macos.tar.gz!Sonarr']"
|
echo "##teamcity[publishArtifacts '$outputFolderMacOS/** => Sonarr.$BRANCH.$BUILD_NUMBER.macos.tar.gz!Sonarr']"
|
||||||
echo "##teamcity[publishArtifacts '$outputFolderMacOSApp/** => Sonarr.$BRANCH.$BUILD_NUMBER.macos.zip']"
|
echo "##teamcity[publishArtifacts '$outputFolderMacOSApp/** => Sonarr.$BRANCH.$BUILD_NUMBER.macos.zip']"
|
||||||
echo "##teamcity[publishArtifacts 'debian => debian.zip/debian']"
|
|
||||||
|
# Debian Package
|
||||||
|
echo "##teamcity[publishArtifacts 'distribution/** => distribution.zip']"
|
||||||
|
|
||||||
|
ProgressEnd 'Publishing Artifacts'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Use mono or .net depending on OS
|
# Use mono or .net depending on OS
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
nzbdrone {version} {branch}; urgency=low
|
|
||||||
|
|
||||||
* Automatic Release.
|
|
||||||
|
|
||||||
-- NzbDrone <contact@nzbdrone.com> Mon, 26 Aug 2013 00:00:00 -0700
|
|
|
@ -1,12 +0,0 @@
|
||||||
Section: web
|
|
||||||
Priority: optional
|
|
||||||
Maintainer: Sonarr <contact@nzbdrone.com>
|
|
||||||
Source: nzbdrone
|
|
||||||
Homepage: https://sonarr.tv
|
|
||||||
Vcs-Git: git@github.com:Sonarr/Sonarr.git
|
|
||||||
Vcs-Browser: https://github.com/Sonarr/Sonarr
|
|
||||||
|
|
||||||
Package: nzbdrone
|
|
||||||
Architecture: all
|
|
||||||
Depends: libmono-cil-dev (>= 3.2), sqlite3 (>= 3.7), mediainfo (>= 0.7.52)
|
|
||||||
Description: Sonarr is an internet PVR
|
|
|
@ -1 +0,0 @@
|
||||||
nzbdrone_bin/* opt/NzbDrone
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
fromdos ./debian/*
|
||||||
|
echo Version: "$dependent_build_number" Branch: "$dependent_build_branch"
|
||||||
|
|
||||||
|
rm -r ./sonarr_bin/Sonarr.Update
|
||||||
|
|
||||||
|
echo Updating changelog
|
||||||
|
sed -i "s/{version}/$dependent_build_number/g" debian/changelog
|
||||||
|
sed -i "s/{branch}/$dependent_build_branch/g" debian/changelog
|
||||||
|
|
||||||
|
echo Running debuild
|
||||||
|
debuild -b
|
||||||
|
|
||||||
|
echo Moving stuff around
|
||||||
|
mv ../sonarr_*.deb ./
|
||||||
|
mv ../sonarr_*.changes ./
|
||||||
|
rm ../sonarr_*.build
|
||||||
|
|
||||||
|
echo Signing Package
|
||||||
|
dpkg-sig -k 884589CE --sign builder "sonarr_${dependent_build_number}_all.deb"
|
||||||
|
|
||||||
|
echo running alien
|
||||||
|
alien -r -v ./*.deb
|
|
@ -0,0 +1,5 @@
|
||||||
|
sonarr ({version}) {branch}; urgency=low
|
||||||
|
|
||||||
|
* Automatic Release.
|
||||||
|
|
||||||
|
-- Sonarr <hello@sonarr.tv> Sun, 28 Jan 2018 00:00:00 -0700
|
|
@ -0,0 +1,13 @@
|
||||||
|
Section: web
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Sonarr <hello@sonarr.tv>
|
||||||
|
Source: sonarr
|
||||||
|
Homepage: https://sonarr.tv
|
||||||
|
Vcs-Git: git@github.com:Sonarr/Sonarr.git
|
||||||
|
Vcs-Browser: https://github.com/Sonarr/Sonarr
|
||||||
|
|
||||||
|
Package: sonarr
|
||||||
|
Architecture: all
|
||||||
|
Conflicts: nzbdrone
|
||||||
|
Depends: libmono-cil-dev (>= 4.6), sqlite3 (>= 3.7), mediainfo (>= 0.7.52)
|
||||||
|
Description: Internet PVR
|
|
@ -1,24 +1,24 @@
|
||||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
Upstream-Name: nzbdrone
|
Upstream-Name: sonarr
|
||||||
Source: https://github.com/Sonarr/Sonarr
|
Source: https://github.com/Sonarr/Sonarr
|
||||||
|
|
||||||
Files: *
|
Files: *
|
||||||
Copyright: 2010-2016 Sonarr <hello@sonarr.tv>
|
Copyright: 2010-2016 Sonarr <hello@sonarr.tv>
|
||||||
|
|
||||||
License: GPL-3.0+
|
License: GPL-3.0+
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
.
|
.
|
||||||
This package is distributed in the hope that it will be useful,
|
This package is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
.
|
.
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
.
|
.
|
||||||
On Debian systems, the complete text of the GNU General
|
On Debian systems, the complete text of the GNU General
|
||||||
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
|
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
|
|
@ -0,0 +1 @@
|
||||||
|
sonarr_3.0.0.0_all.deb web optional
|
|
@ -0,0 +1,2 @@
|
||||||
|
sonarr_bin/* /opt/sonarr
|
||||||
|
debian/sonarr.service /lib/systemd/system
|
|
@ -0,0 +1,33 @@
|
||||||
|
USER="sonarr"
|
||||||
|
|
||||||
|
# Add User
|
||||||
|
|
||||||
|
if ! getent passwd "$USER" >/dev/null; then
|
||||||
|
adduser --quiet --system --shell /bin/bash --home /var/opt/sonarr --group "$USER"
|
||||||
|
|
||||||
|
if ! getent group "$USER" >/dev/null; then
|
||||||
|
groupadd "$USER"
|
||||||
|
usermod -a -G "$USER" "$USER"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create home directory
|
||||||
|
|
||||||
|
if [ ! -d /var/opt/sonarr ]; then
|
||||||
|
mkdir -p /var/opt/sonarr
|
||||||
|
chown $USER:$USER /var/opt/sonarr
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set permissions on /opt/sonarr
|
||||||
|
|
||||||
|
chown -R $USER:$USER /opt/sonarr
|
||||||
|
|
||||||
|
# Start Sonarr automatically
|
||||||
|
|
||||||
|
if [ -f /proc/1/comm ]; then
|
||||||
|
if [ "`cat /proc/1/comm`" = "systemd" ]; then
|
||||||
|
# Enable and start systemd service
|
||||||
|
systemctl enable sonarr.service
|
||||||
|
systemctl start sonarr.service
|
||||||
|
fi
|
||||||
|
fi
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# In case this system is running systemd, we make systemd reload the unit files
|
||||||
|
# to pick up changes.
|
||||||
|
if [ -d /run/systemd/system ] ; then
|
||||||
|
systemctl --system daemon-reload >/dev/null || true
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
if [ -f /proc/1/comm ] && [ "`cat /proc/1/comm`" = "systemd" ]; then
|
||||||
|
rm -f /etc/init.d/sonarr
|
||||||
|
systemctl stop sonarr.service
|
||||||
|
systemctl disable sonarr.service
|
||||||
|
fi
|
|
@ -0,0 +1,16 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Sonarr Daemon
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=sonarr
|
||||||
|
Group=sonarr
|
||||||
|
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/mono --debug /opt/sonarr/Sonarr.exe -nobrowser
|
||||||
|
TimeoutStopSec=20
|
||||||
|
KillMode=process
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue