diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..3eefcb9 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.0.0 diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..36bccf6 --- /dev/null +++ b/build.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# +# Author : vincent.benoit@benserv.fr +# Date : 11/2022 +# Version : 1.0 +# Brief : création du package Debian pour la configuration du systeme RPI +# +########################################################################### + +create_deb() { + dirname=kinerpisys-$1 + /usr/bin/mkdir -p bdist_deb/$dirname + cd bdist_deb/$dirname + debvers=`/usr/bin/cat /etc/debian_version` + echo "$debvers" + IFS='.' + read -ra vers <<< "$debvers" + if [ "$vers" == "10" ]; then + # Write compat file to deb template for Debian 10.x + cat > $2/template/compat << EOF +11 +EOF + fi + /usr/bin/dh_make -t $2/template -n -y -i -d + /usr/bin/find $2/misc -type f -exec /usr/bin/cp -a {} . \; + /usr/bin/dpkg-buildpackage -b -uc -us -rfakeroot + /usr/bin/rm -f $2/template/compat + cd .. + if [ $? == "0" ] && [ ! -d "$2/dist" ]; then + /usr/bin/mkdir -p $2/dist + /usr/bin/find . -type f -name "*.deb" -exec /usr/bin/cp -a {} $2/dist \; + fi +} + +echo "*** Remove old dirs ***" +/usr/bin/rm -rf bdist_deb build dist +echo "*** read version ***" +vers=`/usr/bin/cat VERSION` +rootpath=`pwd` +echo "*** Create Debian Misc Package ***" +create_deb "$vers" "$rootpath" +echo "*** that's All Folks ...***" diff --git a/kinerpisys-1.0.0/debian/.debhelper/generated/kinerpisys/installed-by-dh_installdocs b/kinerpisys-1.0.0/debian/.debhelper/generated/kinerpisys/installed-by-dh_installdocs deleted file mode 100644 index e69de29..0000000 diff --git a/kinerpisys-1.0.0/debian/changelog b/kinerpisys-1.0.0/debian/changelog deleted file mode 100644 index 1f22fc4..0000000 --- a/kinerpisys-1.0.0/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -kinerpisys (1.0.0) stable; urgency=medium - - * Initial Release. - - -- Vincent BENOIT Mon, 21 Nov 2022 17:26:48 +0100 diff --git a/kinerpisys-1.0.0/debian/compat b/kinerpisys-1.0.0/debian/compat deleted file mode 100644 index b4de394..0000000 --- a/kinerpisys-1.0.0/debian/compat +++ /dev/null @@ -1 +0,0 @@ -11 diff --git a/kinerpisys-1.0.0/debian/source/format b/kinerpisys-1.0.0/debian/source/format deleted file mode 100644 index 89ae9db..0000000 --- a/kinerpisys-1.0.0/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/kinerpisys-1.0.0/crontab b/misc/crontab similarity index 100% rename from kinerpisys-1.0.0/crontab rename to misc/crontab diff --git a/kinerpisys-1.0.0/dhcpcd.conf b/misc/dhcpcd.conf similarity index 100% rename from kinerpisys-1.0.0/dhcpcd.conf rename to misc/dhcpcd.conf diff --git a/kinerpisys-1.0.0/dnsmasq.conf b/misc/dnsmasq.conf similarity index 100% rename from kinerpisys-1.0.0/dnsmasq.conf rename to misc/dnsmasq.conf diff --git a/kinerpisys-1.0.0/hostapd b/misc/hostapd similarity index 100% rename from kinerpisys-1.0.0/hostapd rename to misc/hostapd diff --git a/kinerpisys-1.0.0/hostapd.conf b/misc/hostapd.conf similarity index 100% rename from kinerpisys-1.0.0/hostapd.conf rename to misc/hostapd.conf diff --git a/kinerpisys-1.0.0/hostname b/misc/hostname similarity index 100% rename from kinerpisys-1.0.0/hostname rename to misc/hostname diff --git a/kinerpisys-1.0.0/hosts b/misc/hosts similarity index 100% rename from kinerpisys-1.0.0/hosts rename to misc/hosts diff --git a/kinerpisys-1.0.0/logrotate b/misc/logrotate similarity index 100% rename from kinerpisys-1.0.0/logrotate rename to misc/logrotate diff --git a/kinerpisys-1.0.0/logrotate.conf b/misc/logrotate.conf similarity index 100% rename from kinerpisys-1.0.0/logrotate.conf rename to misc/logrotate.conf diff --git a/kinerpisys-1.0.0/rsyslog.conf b/misc/rsyslog.conf similarity index 100% rename from kinerpisys-1.0.0/rsyslog.conf rename to misc/rsyslog.conf diff --git a/template/changelog b/template/changelog new file mode 100644 index 0000000..b41a763 --- /dev/null +++ b/template/changelog @@ -0,0 +1,5 @@ +#PACKAGE# (#VERSION#) stable; urgency=medium + + * Initial release + + -- #USERNAME# <#EMAIL#> #DATE# diff --git a/kinerpisys-1.0.0/debian/control b/template/control similarity index 51% rename from kinerpisys-1.0.0/debian/control rename to template/control index 80649d4..a940152 100644 --- a/kinerpisys-1.0.0/debian/control +++ b/template/control @@ -1,12 +1,12 @@ -Source: kinerpisys +Source: #PACKAGE# Section: misc Priority: optional -Maintainer: Vincent BENOIT -Build-Depends: debhelper (>= 11) -Standards-Version: 4.1.3 +Maintainer: #USERNAME# <#EMAIL#> +Build-Depends: #BUILD_DEPS# +Standards-Version: #POLICY# Homepage: https://git.nas.benserv.fr/vincent/KineRPISys -Package: kinerpisys +Package: #PACKAGE# Architecture: all -Depends: ${misc:Depends}, dnsmasq, hostapd, iptables +Depends: ${misc:Depends}, dhcpcd5, dnsmasq, hostapd, iptables, rsyslog, logrotate Description: Meta-paquet pour la configuration du Système Linux de la Raspberry Pi pour le projet KineInterCOM diff --git a/kinerpisys-1.0.0/debian/install b/template/install similarity index 100% rename from kinerpisys-1.0.0/debian/install rename to template/install diff --git a/kinerpisys-1.0.0/debian/kinerpisys.postinst b/template/kinerpisys.postinst similarity index 100% rename from kinerpisys-1.0.0/debian/kinerpisys.postinst rename to template/kinerpisys.postinst diff --git a/kinerpisys-1.0.0/debian/rules b/template/rules similarity index 65% rename from kinerpisys-1.0.0/debian/rules rename to template/rules index f00dbc2..7dab8e0 100755 --- a/kinerpisys-1.0.0/debian/rules +++ b/template/rules @@ -3,5 +3,10 @@ # output every command that modifies files on the build system. #export DH_VERBOSE = 1 +#RULES_START_TEXT# %: - dh $@ + dh $@#DH_ADDON# + +override_dh_auto_install: + +#RULES_END_TEXT#