diff options
-rw-r--r-- | debian/compat | 2 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rwxr-xr-x | debian/rules | 33 | ||||
-rw-r--r-- | debian/systemd/vyatta-router.service | 22 | ||||
-rw-r--r-- | debian/vyatta-cfg.vyatta-router.service | 1 |
5 files changed, 41 insertions, 19 deletions
diff --git a/debian/compat b/debian/compat index 7ed6ff8..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/debian/control b/debian/control index 23c5a8c..51fda59 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: extra Maintainer: VyOS Package Maintainers <maintainers@vyos.net> Build-Depends: debhelper (>= 5), autotools-dev, libglib2.0-dev, libboost-filesystem1.55-dev, libapt-pkg-dev, libtool, flex, - bison, libperl-dev, autoconf, automake, pkg-config, cpio + bison, libperl-dev, autoconf, automake, pkg-config, cpio, dh-autoreconf ,dh-systemd Standards-Version: 3.9.1 Package: vyatta-cfg diff --git a/debian/rules b/debian/rules index e5da58a..59eaab9 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,7 @@ #!/usr/bin/make -f +export DH_OPTIONS + ## uncomment to enable hardening #export DEB_BUILD_HARDENING=1 @@ -14,36 +16,33 @@ cfg_opts += LDFLAGS="-Wl,-z,defs" cfg_opts += CXXFLAGS="$(CXXFLAGS)" inst_opts := --sourcedir=debian/tmp -clean: - dh clean +%: + dh $@ --with=autoreconf,systemd + +autoreconf: + autoreconf -f -i -binary binary-arch binary-indep: install +override_dh_perl: rm -f debian/files - dh binary --before dh_perl dh_perl /opt/vyatta/share/perl5 /opt/vyatta/share/perl5/Vyatta - dh binary --after dh_perl --before dh_gencontrol + +override_dh_gencontrol: rm -f debian/*/DEBIAN/conffiles if [ -f "../.VYOS_DEV_BUILD" ]; then \ dh_gencontrol -- -v999.dev; \ else \ dh_gencontrol; \ fi - dh binary --after dh_gencontrol -build: Makefile -build: +override_dh_auto_configure: rm -f debian/*.debhelper* - dh build --before configure - dh build --after configure --before dh_auto_test - dh build --after dh_auto_test - -Makefile: Makefile.in ./configure $(cfg_opts) -Makefile.in: Makefile.am configure.ac - autoreconf -i --force +override_dh_auto_test: -install: build - dh install --before dh_install +override_dh_install: dh_install $(inst_opts) +override_dh_systemd_enable: + dh_systemd_enable -pvyatta-cfg --name vyatta-router vyatta-router.service + diff --git a/debian/systemd/vyatta-router.service b/debian/systemd/vyatta-router.service new file mode 100644 index 0000000..83d1751 --- /dev/null +++ b/debian/systemd/vyatta-router.service @@ -0,0 +1,22 @@ +[Unit] +SourcePath=/etc/init.d/vyatta-router +Description=VyOS Router +Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target getty@tty1.service getty@tty2.service getty@rrt3.service getty@tty4.service getty@tty5.service getty@tty6.service +After=systemd-journald-dev-log.socket time-sync.target local-fs.target vyatta-unicast.service +Conflicts=shutdown.target + +[Service] +Type=forking +Restart=no +TimeoutSec=5min +IgnoreSIGPIPE=no +KillMode=process +GuessMainPID=no +RemainAfterExit=yes +SysVStartPriority=4 +ExecStart=/etc/init.d/vyatta-router start +ExecStop=/etc/init.d/vyatta-router stop + +[Install] +WantedBy=multi-user.target + diff --git a/debian/vyatta-cfg.vyatta-router.service b/debian/vyatta-cfg.vyatta-router.service new file mode 100644 index 0000000..9d5cfa7 --- /dev/null +++ b/debian/vyatta-cfg.vyatta-router.service @@ -0,0 +1 @@ +systemd/vyatta-router.service |