Updated Debian package
This commit is contained in:
parent
07cbc71aa2
commit
a17a60f914
13
build.sh
13
build.sh
|
@ -248,7 +248,7 @@ PackageTests()
|
|||
fi
|
||||
|
||||
cp $outputFolder/*.dll $testPackageFolder
|
||||
cp ./*.sh $testPackageFolder
|
||||
cp ./test.sh $testPackageFolder
|
||||
|
||||
echo "Creating MDBs for tests"
|
||||
CreateMdbs $testPackageFolder
|
||||
|
@ -284,12 +284,21 @@ CleanupWindowsPackage()
|
|||
|
||||
PublishArtifacts()
|
||||
{
|
||||
ProgressStart 'Publishing Artifacts'
|
||||
|
||||
# Tests
|
||||
echo "##teamcity[publishArtifacts '_tests/** => tests.zip']"
|
||||
|
||||
# Releases
|
||||
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 '$outputFolderMacOS/** => Sonarr.$BRANCH.$BUILD_NUMBER.macos.tar.gz!Sonarr']"
|
||||
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
|
||||
|
|
|
@ -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,5 +1,5 @@
|
|||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: nzbdrone
|
||||
Upstream-Name: sonarr
|
||||
Source: https://github.com/Sonarr/Sonarr
|
||||
|
||||
Files: *
|
|
@ -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