#--------------------------------------------------------------------
install :
@ # Creating all needed system directory
- @ install -d $(DESTDIR)/$(SBINDIR)/
@ install -d $(DESTDIR)/$(DATADIR)/$(APPN)/
@ install -d $(DESTDIR)/$(ETCDIR)/$(APPN)/
+ @ install -d $(DESTDIR)/$(LIBDIR)/$(APPN)/
+ @ install -d $(DESTDIR)/$(SBINDIR)/
@ cp -a \
bin/* \
$(DESTDIR)/$(SBINDIR)/
@ cp -a \
linux \
$(DESTDIR)/$(DATADIR)/$(APPN)/
+ @ cp -a \
+ shell \
+ $(DESTDIR)/$(LIBDIR)/$(APPN)/
#--------------------------------------------------------------------
SUBDIR = \
APPNAME = mailleur
#--------------------------------------------------------------------
#Managing testarea
-DATADIR = usr/share
+LIBDIR = /usr/lib
+DATADIR = /usr/share
SBINDIR = /usr/sbin
ETCDIR = /etc
CURDIR = $(shell pwd)
$(APLV)/bin \
$(APLV)/lib \
$(APLV)/linux \
+ $(APLV)/shell \
$(APLV)
@ date > $(APLV)/$(APLV).build_date
@ cp -a Makefile* $(APLV)/
@ cp -a conf/*.conf $(APLV)/conf/
@ cp -a lib/{*.c,*.h} $(APLV)/lib/
@ cp -a linux/* $(APLV)/linux/
+ @ cp -a \
+ shell/getsysop.sh \
+ $(APLV)/shell/
@ cp -a app/Makefile $(APLV)/app/Makefile
@ cp -a lib/Makefile $(APLV)/lib/Makefile
@ tar zcf $(SRC)/$(APLV).tar.gz $(APLV)
URL : http://mailleur.safe.ca/
Source0 : %{name}-@@VERSION@@.tar.gz
+#-----------------------------------------------------------------------------
+BuildRequires : postgresql
+
+Requires : bash
+
#-----------------------------------------------------------------------------
%description
'%{name}' is an email firewall. Its purpose is to filter all email,
%{_sbindir}/receiver
%{_sbindir}/sender
%{_sbindir}/sorter
+%{_libdir}/%{name}/shell/*.sh
#-----------------------------------------------------------------------------
Summary : mailleur using postgresql as Data-base
#-----------------------------------------------------------------------------
-BuildRequires : postgresql
-
Requires : postgresql-server
#-----------------------------------------------------------------------------
--- /dev/null
+#! /usr/bin/bash
+#---------------------------------------------------
+#shell script to get the OS used to run clement
+
+DIST=` \
+ cat /etc/os-release | \
+ grep "^ID=" | \
+ sed -e 's:"::g' | \
+ cut -d '=' -f2 | \
+ tr '[:upper:]' '[:lower:]' \
+ `
+
+case "$DIST" in
+ "osukiss" ) #Osukiss distribution
+ OS="osukiss"
+ ;;
+ "rocky" | \
+ "fedora" )
+ OS="systemd" #systemd distribution
+ ;;
+ * ) #all other are system V
+ OS="sysv"
+ ;;
+ esac
+echo $OS