From ad73d0c158001fa1b33b2f0169703abacf5d33dd Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Wed, 16 Jul 2025 18:38:49 -0400 Subject: [PATCH] Improving spec file --- app/Makefile | 4 ++-- mailleur.spec.in | 21 +++++++++------------ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/app/Makefile b/app/Makefile index 0de9deb..9cfd449 100644 --- a/app/Makefile +++ b/app/Makefile @@ -65,8 +65,7 @@ LIBS = $(LIBMAIL) \ chkspf \ feeder \ : toremake $(OBJS) - @ $(LD) $(LDFLAGS) -o ../bin-posql/$@ $@.o $(LIBS) - @ $(LD) $(LDFLAGS) -o ../bin-mysql/$@ $@.o $(LIBS) + @ $(LD) $(LDFLAGS) -o ../bin-util/$@ $@.o $(LIBS) receiver \ scarmt \ @@ -139,6 +138,7 @@ sender.o: sender.c \ toremake: Makefile touch toremake + @ - mkdir -p ../bin-util @ - mkdir -p ../bin-posql @ - mkdir -p ../bin-mysql - rm -f $(EXE) *.o diff --git a/mailleur.spec.in b/mailleur.spec.in index 3c90bee..703e320 100644 --- a/mailleur.spec.in +++ b/mailleur.spec.in @@ -43,6 +43,8 @@ search about email exchange within time and transaction context. %attr(0644,root,root) %config(noreplace) %{dovedir}/dovecot.conf %{dovedir}/dovecot-2.0* %attr(0640,%{name},dovecot) %config(noreplace) %{dovedir}/passfile +%{_libexecdir}/%{name}/bin-util/chkspf +%{_libexecdir}/%{name}/bin-util/feeder %attr(0754,root,root) %{_libdir}/%{name}/shell/*.sh %attr(0754,root,root) %{_libdir}/%{name}/support/addconfig.sh %attr(0754,root,root) %{_libdir}/%{name}/support/crdb.sh @@ -154,6 +156,7 @@ Obsoletes : %{name}-mysql <= %{version}-%{release} %defattr(-,root,root,-) %attr(0755,%{name},mail) %{_libexecdir}/%{name}/bin-posql/* +#----------------------------------------------------------------------------- %post postgresql OS=`%{_libdir}/%{name}/shell/getsysos.sh` if [ "$1" = 1 ]; then @@ -166,8 +169,6 @@ if [ "$1" = 1 ]; then #generating postgresql receiver and sender #generating exec to be path of the /usr/sbin path for exe in \ - chkspf \ - feeder \ receiver \ sender \ sorter @@ -194,8 +195,6 @@ case "$OS" in %postun postgresql if [ "$1" = 0 ]; then - rm -f %{_sbindir}/chkspf - rm -f %{_sbindir}/feeder rm -f %{_sbindir}/receiver rm -f %{_sbindir}/sender rm -f %{_sbindir}/sorter @@ -221,6 +220,8 @@ Obsoletes : %{name}-postgresql <= %{version}-%{release} %defattr(-,root,root,-) %attr(0755,%{name},mail) %{_libexecdir}/%{name}/bin-mysql/* +#----------------------------------------------------------------------------- + %post mysql OS=`%{_libdir}/%{name}/shell/getsysos.sh` if [ "$1" = 1 ]; then @@ -231,8 +232,6 @@ if [ "$1" = 1 ]; then fi #generating exec to be path of the /usr/sbin path for exe in \ - chkspf \ - feeder \ receiver \ sender \ sorter @@ -259,8 +258,6 @@ case "$OS" in %postun mysql if [ "$1" = 0 ]; then - rm -f %{_sbindir}/chkspf - rm -f %{_sbindir}/feeder rm -f %{_sbindir}/receiver rm -f %{_sbindir}/sender rm -f %{_sbindir}/sorter @@ -288,10 +285,10 @@ if [ "$1" = 0 ]; then install #removing default link generated by make -%{__rm} -fr \ - %{buildroot}%{_sbindir}/receiver\ - %{buildroot}%{_sbindir}/sender \ - %{buildroot}%{_sbindir}/sorter \ +#%{__rm} -fr \ +# %{buildroot}%{_sbindir}/receiver\ +# %{buildroot}%{_sbindir}/sender \ +# %{buildroot}%{_sbindir}/sorter \ #============================================================================= %changelog -- 2.47.3