Commit 60d0ada3 authored by Runar Borge's avatar Runar Borge

First stage of propper debian package framework

the current implementation of debian framework is not following the
correct procedure of building for debian, this commit will be the first
to allow a more correct implementation
(but it is still taking a few shortcuts)
parent f3c0eacf
PREFIX = /opt/microdep
all:
: # do nothing
install:
install -v -d $(DESTDIR)/$(PREFIX)/bin/
install -v -D -m 755 bin/* $(DESTDIR)/$(PREFIX)/bin/
install -v -d $(DESTDIR)/$(PREFIX)/etc/
install -v -D -m 644 -o microdep etc/* $(DESTDIR)/$(PREFIX)/etc/
uninstall:
-rm -f $(DESTDIR)/$(PREFIX)/
deb:
dpkg-buildpackage -i -I -us -uc -b -rfakeroot
\ No newline at end of file
microdep (0.0) Stable; urgency=medium
* Dummy autogenerated changelog entry
-- Mainainer <noname@uninett.no> Wed, 01 Jan 2020 00:00:00 +0100
9
\ No newline at end of file
Source: microdep
Section: uninett
Priority: extra
Maintainer:olav.kvittem@uninett.no
Build-Depends: debhelper (>=9.0.0~)
Package: microdep
Architecture: all
Depends: rude,
crude,
traceroute,
perl-base,
cron,
libstatistics-linefit-perl,
libjson-xs-perl,
libdatetime-perl
Description: Software for measuring network using rude/crude and traceroute.
#! /bin/sh
# Installing user if not allready installed
if ! getent group microdep >/dev/null 2>&1; then
addgroup --system --quiet microdep
fi
if ! getent passwd microdep >/dev/null 2>&1; then
adduser --system --quiet --ingroup microdep -m microdep
fi
echo microdep 'ALL=(ALL) NOPASSWD: /usr/local/sbin/get-icmp.sh' > /etc/sudoers.d/microdep
cp /home/microdep/microdep/bin/get-icmp.sh /usr/local/sbin/
find /home/microdep -not -user microdep -exec chown microdep.microdep \{} \;
if test -e /usr/bin/crude -a ! -e /home/microdep/microdep/bin/crude ; then
sudo -u microdep ln -s /usr/bin/rude /home/microdep/microdep/bin/
sudo -u microdep ln -s /usr/bin/crude /home/microdep/microdep/bin/
fi
mkdir -p /var/log/mp-rude
chown microdep.microdep /var/log/mp-rude
sudo -u microdep /home/microdep/microdep/bin/update-config
crontab -u microdep /home/microdep/microdep/etc/crontab.cfg
#! /bin/sh
if ! test -d /home/microdep ; then
useradd -m -G ssh microdep
fi
#! /bin/sh
if test -d /home/microdep/bin ; then
if test -l /home/microdep/bin/rude ; then
rm /home/microdep/bin/rude
rm /home/microdep/bin/crude
fi
fi
crontab -u microdep -r
rm /etc/sudoers.d/microdep
#! /usr/bin/make -f
%:
dh $@
override_dh_gencontrol:
dh_gencontrol -- -v$(git describe --tags 2>/dev/null || echo 0.0-no_git_tag)
override_dh_auto_install:
dh_auto_install -- PREFIX=/var/lib/microdep
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment