SHELL=/bin/bash
INIT=/init

ETCDIR=/etc
LIBDIR=/lib
LSBDIR=${LIBDIR}/services
INITDIR=${LIBDIR}${INIT}
SERVICESDIR=${INITDIR}/services
MULTI=${ETCDIR}${INIT}/multi
EXTDIR=${DESTDIR}${ETCDIR}

MODE=754
DIRMODE=755
CONFMODE=644

all:
	@grep "^install" Makefile | cut -d ":" -f 1
	@echo "Select an appropriate install target from the above list" 

create-dirs:
	install -d -m ${DIRMODE} ${DESTDIR}${MULTI}

create-service-dir:
	install -d -m ${DIRMODE} ${DESTDIR}${LSBDIR}

install-service-dhclient: create-service-dir
	install -m ${MODE} lsb/dhclient ${DESTDIR}${LSBDIR}

install-service-dhcpcd: create-service-dir
	install -m ${MODE} lsb/dhcpcd  ${DESTDIR}${LSBDIR}

install-service-bridge: create-service-dir
	install -m ${MODE} lsb/bridge  ${DESTDIR}${LSBDIR}

install-service-wpa: create-service-dir
	install -m ${MODE} lsb/wpa ${DESTDIR}${LSBDIR}

install-runyx-acpid: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/acpid
	cp -apv acpid/* ${DESTDIR}${SERVICESDIR}/acpid
	ln -sfv ${SERVICESDIR}/acpid  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/acpid/*
	chmod +x ${DESTDIR}${SERVICESDIR}/acpid/log/*

install-runyx-alsa: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/audio
	cp -apv audio/* ${DESTDIR}${SERVICESDIR}/audio
	ln -sfv ${SERVICESDIR}/audio  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/audio/*

install-runyx-autofs: create-dirs
	install -m ${CONFMODE} sysconfig/autofs.conf ${EXTDIR}/sysconfig/
	mkdir -pv ${DESTDIR}${SERVICESDIR}/autofs
	cp -apv autofs/* ${DESTDIR}${SERVICESDIR}/autofs
	ln -sfv ${SERVICESDIR}/autofs  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/autofs/*

install-runyx-atd: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/atd
	cp -apv atd/* ${DESTDIR}${SERVICESDIR}/atd
	ln -sfv ${SERVICESDIR}/atd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/atd/*
	chmod +x ${DESTDIR}${SERVICESDIR}/atd/log/*

install-runyx-avahi: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/avahi-daemon
	cp -apv avahi-daemon/* ${DESTDIR}${SERVICESDIR}/avahi-daemon
	ln -sfv ${SERVICESDIR}/avahi-daemon  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/avahi-daemon/*

install-runyx-bind: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/bind
	cp -apv bind/* ${DESTDIR}${SERVICESDIR}/bind
	ln -sfv ${SERVICESDIR}/bind  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/bind/*

install-runyx-bluetooth: create-dirs
	install -m ${CONFMODE} sysconfig/bluetooth ${EXTDIR}/sysconfig/bluetooth
	mkdir -pv ${DESTDIR}${SERVICESDIR}/bluetooth
	cp -apv bluetooth/* ${DESTDIR}${SERVICESDIR}/bluetooth
	ln -sfv ${SERVICESDIR}/bluetooth  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/bluetooth/*
	chmod +x ${DESTDIR}${SERVICESDIR}/bluetooth/log/*

install-runyx-cups: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/cupsd
	cp -apv cupsd/* ${DESTDIR}${SERVICESDIR}/cupsd
	ln -sfv ${SERVICESDIR}/cupsd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/cupsd/*

install-runyx-dbus: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/dbus
	cp -apv dbus/* ${DESTDIR}${SERVICESDIR}/dbus
	ln -sfv ${SERVICESDIR}/dbus  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/dbus/*
	chmod +x ${DESTDIR}${SERVICESDIR}/dbus/log/*

install-runyx-dhcpd: create-dirs
	install -m ${CONFMODE} sysconfig/dhcpd ${EXTDIR}/sysconfig/dhcpd
	mkdir -pv ${DESTDIR}${SERVICESDIR}/dhcpd
	cp -apv dhcpd/* ${DESTDIR}${SERVICESDIR}/dhcpd
	ln -sfv ${SERVICESDIR}/dhcpd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/dhcpd/*
	chmod +x ${DESTDIR}${SERVICESDIR}/dhcpd/log/*

install-runyx-dovecot: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/dovecot
	cp -apv dovecot/* ${DESTDIR}${SERVICESDIR}/dovecot
	ln -sfv ${SERVICESDIR}/dovecot  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/dovecot/*

install-runyx-exim: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/exim
	cp -apv exim/* ${DESTDIR}${SERVICESDIR}/exim
	ln -sfv ${SERVICESDIR}/exim  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/exim/*

install-runyx-fcron: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/fcron
	cp -apv fcron/* ${DESTDIR}${SERVICESDIR}/fcron
	ln -sfv ${SERVICESDIR}/fcron  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/fcron/*
	chmod +x ${DESTDIR}${SERVICESDIR}/fcron/log/*

install-runyx-gpm: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/gpm
	cp -apv gpm/* ${DESTDIR}${SERVICESDIR}/gpm
	ln -sfv ${SERVICESDIR}/gpm  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/gpm/*

install-runyx-haveged: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/haveged
	cp -apv haveged/* ${DESTDIR}${SERVICESDIR}/haveged
	ln -sfv ${SERVICESDIR}/haveged  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/haveged/*

install-runyx-httpd: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/httpd
	cp -apv httpd/* ${DESTDIR}${SERVICESDIR}/httpd
	ln -sfv ${SERVICESDIR}/httpd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/httpd/*

install-runyx-iptables: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/iptables
	cp -apv iptables/* ${DESTDIR}${SERVICESDIR}/iptables
	ln -sfv ${SERVICESDIR}/iptables  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/iptables/*

install-runyx-krb5: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/krb5
	cp -apv krb5/* ${DESTDIR}${SERVICESDIR}/krb5
	ln -sfv ${SERVICESDIR}/krb5  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/krb5/*

install-runyx-lxdm: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/lxdm
	cp -apv lxdm/* ${DESTDIR}${SERVICESDIR}/lxdm
	ln -sfv ${SERVICESDIR}/lxdm  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/lxdm/*

install-runyx-mysql: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/mysql
	cp -apv mysql/* ${DESTDIR}${SERVICESDIR}/mysql
	ln -sfv ${SERVICESDIR}/mysql  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/mysql/*

install-runyx-netfs: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/netfs
	cp -apv netfs/* ${DESTDIR}${SERVICESDIR}/netfs
	ln -sfv ${SERVICESDIR}/netfs  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/netfs/*

install-runyx-networkmanager: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/networkmanager
	cp -apv networkmanager/* ${DESTDIR}${SERVICESDIR}/networkmanager
	ln -sfv ${SERVICESDIR}/networkmanager  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/networkmanager/*

install-runyx-nfs-client: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/nfs-client
	cp -apv nfs-client/* ${DESTDIR}${SERVICESDIR}/nfs-client
	ln -sfv ${SERVICESDIR}/nfs-client  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/nfs-client/*

install-runyx-nfs-server: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/nfs-server
	cp -apv nfs-server/* ${DESTDIR}${SERVICESDIR}/nfs-server
	ln -sfv ${SERVICESDIR}/nfs-server  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/nfs-server/*

install-runyx-ntpd: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/ntpd
	cp -apv ntpd/* ${DESTDIR}${SERVICESDIR}/ntpd
	ln -sfv ${SERVICESDIR}/ntpd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/ntpd/*
	chmod +x ${DESTDIR}${SERVICESDIR}/ntpd/log/*

install-runyx-nginx: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/nginx
	cp -apv nginx/* ${DESTDIR}${SERVICESDIR}/nginx
	ln -sfv ${SERVICESDIR}/nginx  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/nginx/*

install-runyx-php: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/php-fpm
	cp -apv php-fpm/* ${DESTDIR}${SERVICESDIR}/php-fpm
	ln -sfv ${SERVICESDIR}/php-fpm  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/php-fpm/*

install-runyx-postfix: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/postfix
	cp -apv postfix/* ${DESTDIR}${SERVICESDIR}/postfix
	ln -sfv ${SERVICESDIR}/postfix  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/postfix/*

install-runyx-postgresql: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/postgresql
	cp -apv postgresql/* ${DESTDIR}${SERVICESDIR}/postgresql
	ln -sfv ${SERVICESDIR}/postgresql  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/postgresql/*
	chmod +x ${DESTDIR}${SERVICESDIR}/postgresql/log/*

install-runyx-proftpd: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/proftpd
	cp -apv proftpd/* ${DESTDIR}${SERVICESDIR}/proftpd
	ln -sfv ${SERVICESDIR}/proftpd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/proftpd/*

install-runyx-qpopper: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/qpopper
	mkdir -pv ${DESTDIR}${SERVICESDIR}/qpopper-ssl
	cp -apv qpopper/* ${DESTDIR}${SERVICESDIR}/qpopper
	cp -apv qpopper-ssl/* ${DESTDIR}${SERVICESDIR}/qpopper-ssl
	ln -sfv ${SERVICESDIR}/qpopper  ${DESTDIR}${MULTI}
	ln -sfv ${SERVICESDIR}/qpopper-ssl  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/qpopper/*
	chmod +x ${DESTDIR}${SERVICESDIR}/qpopper-ssl/*
	chmod +x ${DESTDIR}${SERVICESDIR}/qpopper/log/*
	chmod +x ${DESTDIR}${SERVICESDIR}/qpopper-ssl/log/*

install-runyx-rpcbind: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/rpcbind
	cp -apv rpcbind/* ${DESTDIR}${SERVICESDIR}/rpcbind
	ln -sfv ${SERVICESDIR}/rpcbind  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/rpcbind/*

install-runyx-rsyncd: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/rsyncd
	cp -apv rsyncd/* ${DESTDIR}${SERVICESDIR}/rsyncd
	ln -sfv ${SERVICESDIR}/rsyncd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/rsyncd/*
	chmod +x ${DESTDIR}${SERVICESDIR}/rsyncd/log/*

install-runyx-samba: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/nmbd
	mkdir -pv ${DESTDIR}${SERVICESDIR}/smbd
	cp -apv nmbd/* ${DESTDIR}${SERVICESDIR}/nmbd
	cp -apv smbd/* ${DESTDIR}${SERVICESDIR}/smbd
	ln -sfv ${SERVICESDIR}/nmbd  ${DESTDIR}${MULTI}
	ln -sfv ${SERVICESDIR}/smbd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/nmbd/*
	chmod +x ${DESTDIR}${SERVICESDIR}/smbd/*
	chmod +x ${DESTDIR}${SERVICESDIR}/nmbd/log/*
	chmod +x ${DESTDIR}${SERVICESDIR}/smbd/log/*

install-runyx-saslauthd: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/saslauthd
	cp -apv saslauthd/* ${DESTDIR}${SERVICESDIR}/saslauthd
	ln -sfv ${SERVICESDIR}/saslauthd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/saslauthd/*

install-runyx-sendmail: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/sendmail
	cp -apv sendmail/* ${DESTDIR}${SERVICESDIR}/sendmail
	ln -sfv ${SERVICESDIR}/sendmail  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/sendmail/*

install-runyx-slapd: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/slapd
	cp -apv slapd/* ${DESTDIR}${SERVICESDIR}/slapd
	ln -sfv ${SERVICESDIR}/slapd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/slapd/*

install-runyx-smartd: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/smartd
	cp -apv smartd/* ${DESTDIR}${SERVICESDIR}/smartd
	ln -sfv ${SERVICESDIR}/smartd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/smartd/*
	chmod +x ${DESTDIR}${SERVICESDIR}/smartd/log/*

install-runyx-soprano: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/soprano
	cp -apv soprano/* ${DESTDIR}${SERVICESDIR}/soprano
	ln -sfv ${SERVICESDIR}/soprano  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/soprano/*

install-runyx-sshd: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/sshd
	cp -apv sshd/* ${DESTDIR}${SERVICESDIR}/sshd
	ln -sfv ${SERVICESDIR}/sshd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/sshd/*
	chmod +x ${DESTDIR}${SERVICESDIR}/sshd/log/*

install-runyx-stunnel: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/stunnel
	cp -apv stunnel/* ${DESTDIR}${SERVICESDIR}/stunnel
	ln -sfv ${SERVICESDIR}/stunnel  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/stunnel/*

install-runyx-svn: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/svn
	cp -apv svn/* ${DESTDIR}${SERVICESDIR}/svn
	ln -sfv ${SERVICESDIR}/svn  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/svn/*
	chmod +x ${DESTDIR}${SERVICESDIR}/svn/log/*

install-runyx-swat: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/swat
	cp -apv swat/* ${DESTDIR}${SERVICESDIR}/swat
	ln -sfv ${SERVICESDIR}/swat  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/swat/*

install-runyx-sysstat: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/sysstat
	cp -apv sysstat/* ${DESTDIR}${SERVICESDIR}/systat
	ln -sfv ${SERVICESDIR}/sysstat  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/sysstat/*

install-runyx-unbound: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/unbound
	cp -apv unbound/* ${DESTDIR}${SERVICESDIR}/unbound
	ln -sfv ${SERVICESDIR}/unbound  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/unbound/*

install-runyx-vboxservice: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/vboxservice
	cp -apv vboxservice/* ${DESTDIR}${SERVICESDIR}/vboxservice
	ln -sfv ${SERVICESDIR}/vboxservice  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/vboxservice/*

install-runyx-virtuoso: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/virtuoso
	cp -apv virtuoso/* ${DESTDIR}${SERVICESDIR}/virtuoso
	ln -sfv ${SERVICESDIR}/virtuoso  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/virtuoso/*
	chmod +x ${DESTDIR}${SERVICESDIR}/virtuoso/log/*

install-runyx-vsftpd: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/vsftpd
	cp -apv vsftpd/* ${DESTDIR}${SERVICESDIR}/vsftpd
	ln -sfv ${SERVICESDIR}/vsftpd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/vsftpd/*
	chmod +x ${DESTDIR}${SERVICESDIR}/vsftpd/log/*

install-runyx-wicd: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/wicd
	cp -apv wicd/* ${DESTDIR}${SERVICESDIR}/wicd
	ln -sfv ${SERVICESDIR}/wicd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/wicd/*

install-runyx-winbindd: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/winbindd
	cp -apv winbindd/* ${DESTDIR}${SERVICESDIR}/winbindd
	ln -sfv ${SERVICESDIR}/winbindd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/winbindd/*

install-runyx-xinetd: create-dirs
	mkdir -pv ${DESTDIR}${SERVICESDIR}/xinetd
	cp -apv xinetd/* ${DESTDIR}${SERVICESDIR}/xinetd
	ln -sfv ${SERVICESDIR}/xinetd  ${DESTDIR}${MULTI}
	chmod +x ${DESTDIR}${SERVICESDIR}/xinetd/*

uninstall-runyx-acpid:
	rm -rvf ${DESTDIR}${SERVICESDIR}/acpid

uninstall-runyx-alsa:
	rm -rvf ${DESTDIR}${SERVICESDIR}/audio

uninstall-runyx-atd:
	rm -rvf ${DESTDIR}${SERVICESDIR}/atd

uninstall-runyx-autofs:
	rm -vf ${ETCDIR}/sysconfig/autofs.conf
	rm -rvf ${DESTDIR}${SERVICESDIR}/autofs

uninstall-runyx-avahi:
	rm -rvf ${DESTDIR}${SERVICESDIR}/avahi-daemon

uninstall-runyx-bind:
	rm -rvf ${DESTDIR}${SERVICESDIR}/bind

uninstall-runyx-bluetooth:
	rm -vf ${EXTDIR}/sysconfig/bluetooth
	rm -rfv ${DESTDIR}${SERVICESDIR}/bluetooth

uninstall-runyx-cups:
	rm -rvf ${DESTDIR}${SERVICESDIR}/cupsd

uninstall-runyx-dbus:
	rm -rvf ${DESTDIR}${SERVICESDIR}/dbus

uninstall-runyx-dhcpd:
	rm -vf ${EXTDIR}/sysconfig/dhcpd
	rm -rvf ${DESTDIR}${SERVICESDIR}/dhcpd

uninstall-runyx-dovecot:
	rm -rvf ${DESTDIR}${SERVICESDIR}/dovecot

uninstall-runyx-exim:
	rm -rvf ${DESTDIR}${SERVICESDIR}/exim

uninstall-runyx-fcron:
	rm -rvf ${DESTDIR}${SERVICESDIR}/fcron

uninstall-runyx-gpm:
	rm -rvf ${DESTDIR}${SERVICESDIR}/gpm

uninstall-runyx-haveged:
	rm -rvf ${DESTDIR}${SERVICESDIR}/haveged

uninstall-runyx-httpd:
	rm -rvf ${DESTDIR}${SERVICESDIR}/httpd

uninstall-runyx-iptables:
	rm -rvf ${DESTDIR}${SERVICESDIR}/iptables

uninstall-runyx-kdm:
	rm -rvf ${DESTDIR}${SERVICESDIR}/kdm

uninstall-runyx-krb5:
	rm -rvf ${DESTDIR}${SERVICESDIR}/krb5

uninstall-runyx-mysql:
	rm -rvf ${DESTDIR}${SERVICESDIR}/mysql

uninstall-runyx-netfs:
	rm -rvf ${DESTDIR}${SERVICESDIR}/netfs

uninstall-runyx-networkmanager:
	rm -rvf ${DESTDIR}${SERVICESDIR}/networkmanager

uninstall-runyx-nfs-client:
	rm -rvf ${DESTDIR}${SERVICESDIR}/nfs-client

uninstall-runyx-nfs-server:
	rm -rvf ${DESTDIR}${SERVICESDIR}/nfs-server

uninstall-runyx-ntpd:
	rm -rvf ${DESTDIR}${SERVICESDIR}/ntpd

uinstall-runyx-nginx:
	rm -rvf ${DESTDIR}${SERVICESDIR}/nginx

uninstall-runyx-php:
	rm -rvf ${DESTDIR}${SERVICESDIR}/php-fpm

uninstall-runyx-postfix:
	rm -rvf ${DESTDIR}${SERVICESDIR}/postfix

uninstall-runyx-postgresql:
	rm -rvf ${DESTDIR}${SERVICESDIR}/postgresql

uninstall-runyx-proftpd:
	rm -rvf ${DESTDIR}${SERVICESDIR}/proftpd

uninstall-runyx-qpopper:
	rm -rvf ${DESTDIR}${SERVICESDIR}/qpopper
	rm -rvf ${DESTDIR}${SERVICESDIR}/qpopper-ssl

uninstall-runyx-rsyncd:
	rm -rvf ${DESTDIR}${SERVICESDIR}/rsyncd

uninstall-runyx-samba:
	rm -rvf ${DESTDIR}${SERVICESDIR}/nmbd
	rm -rvf ${DESTDIR}${SERVICESDIR}/smbd

uninstall-runyx-saslauthd:
	rm -f ${EXTDIR}/sysconfig/saslauthd
	rm -rvf ${DESTDIR}${SERVICESDIR}/saslauthd

uninstall-runyx-sendmail:
	rm -rvf ${DESTDIR}${SERVICESDIR}/sendmail

uninstall-runyx-slapd:
	rm -f ${EXTDIR}/sysconfig/slapd
	rm -rvf ${DESTDIR}${SERVICESDIR}/slapd

uninstall-runyx-smartd:
	rm -rvf ${DESTDIR}${SERVICESDIR}/smartd

uninstall-runyx-sshd:
	rm -rvf ${DESTDIR}${SERVICESDIR}/sshd

uninstall-runyx-stunnel:
	rm -rvf ${DESTDIR}${SERVICESDIR}/stunnel

uninstall-runyx-svn:
	rm -rvf ${DESTDIR}${SERVICESDIR}/svn

uninstall-runyx-sysstat:
	rm -rvf ${DESTDIR}${SERVICESDIR}/sysstat

uninstall-runyx-unbound:
	rm -rvf ${DESTDIR}${SERVICESDIR}/unbound

uninstall-runyx-vboxservice:
	rm -rvf ${DESTDIR}${SERVICESDIR}/vboxservice

uninstall-runyx-virtuoso:
	rm -rvf ${DESTDIR}${SERVICESDIR}/virtuoso

uninstall-runyx-vsftpd:
	rm -rvf ${DESTDIR}${SERVICESDIR}/vsftpd

uninstall-runyx-winbindd:
	rm -rvf ${DESTDIR}${SERVICESDIR}/winbindd

uninstall-runyx-xinetd:
	rm -rvf ${DESTDIR}${SERVICESDIR}/xinetd

.PHONY: all create-dirs create-service-dir \
	install-runyx-service-dhclient \
	install-runyx-service-dhcpcd \
	install-runyx-service-ipx \
	install-runyx-service-pppoe \
	install-runyx-atd \
	install-runyx-acpid \
	install-runyx-alsa \
	install-runyx-avahi \
	install-runyx-httpd \
	install-runyx-php \
	install-runyx-nginx \
	install-runyx-bind \
	install-runyx-bluetooth \
	install-runyx-cups \
	install-runyx-saslauthd \
	install-runyx-dhcpd \
	install-runyx-dovecot \
	install-runyx-exim \
	install-runyx-fcron \
	install-runyx-gdm \
	install-runyx-gpm \
	install-runyx-heimdal \
	install-runyx-iptables \
	install-runyx-kdm \
	install-runyx-krb5 \
	install-runyx-lxdm \
	install-runyx-mysql \
	install-runyx-netfs \
	install-runyx-networkmanager \
	install-runyx-nfs-client \
	install-runyx-nfs-server \
	install-runyx-ntp \
	install-runyx-slapd \
	install-runyx-postfix \
	install-runyx-postgresql \
	install-runyx-proftpd \
	install-runyx-qpopper \
	install-runyx-random \
	install-runyx-rsync \
	install-runyx-samba \
	install-runyx-sendmail \
	install-runyx-smartd \
	install-runyx-soprano \
	install-runyx-sshd \
	install-runyx-stunnel \
	install-runyx-svn \
	install-runyx-sysstat \
	install-runyx-vsftpd \
	install-runyx-unbound \
	install-runyx-vboxservice \
	install-runyx-virtuoso \
	install-runyx-winbindd \
	install-runyx-xinetd \
	uninstall-runyx-acpid \
	uninstall-runyx-alsa \
	uninstall-runyx-atd \
	uninstall-runyx-avahi \
	uninstall-runyx-bind \
	uninstall-runyx-bluetooth \
	uninstall-runyx-cups \
	uninstall-runyx-dhcpd \
	uninstall-runyx-dovecot \
	uninstall-runyx-exim \
	uninstall-runyx-fcron \
	uninstall-runyx-gpm \
	uninstall-runyx-httpd \
	uninstall-runyx-iptables \
	uninstall-runyx-kdm \
	uninstall-runyx-krb5 \
	uninstall-runyx-lxdm \
	uninstall-runyx-mysql \
	uninstall-runyx-netfs \
	uninstall-runyx-networkmanager \
	uninstall-runyx-nfs-client \
	uninstall-runyx-nfs-server \
	uninstall-runyx-ntp \
	uninstall-runyx-slapd \
	uninstall-runyx-php \
	uninstall-runyx-nginx \
	uninstall-runyx-postfix \
	uninstall-runyx-postgresql \
	uninstall-runyx-proftpd \
	uninstall-runyx-qpopper \
	uninstall-runyx-rsync \
	uninstall-runyx-samba \
	uninstall-runyx-saslauthd \
	uninstall-runyx-sendmail \
	uninstall-runyx-smartd \
	uninstall-runyx-soprano \
	uninstall-runyx-sshd \
	uninstall-runyx-stunnel \
	uninstall-runyx-svn \
	uninstall-runyx-sysstat \
	uninstall-runyx-unbound \
	uninstall-runyx-vboxservice \
	uninstall-runyx-virtuoso \
	uninstall-runyx-vsftpd   \
	uninstall-runyx-winbindd \
	uninstall-runyx-xinetd
