Skip to content

Commit

Permalink
updated SPEC files
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhangui committed May 14, 2023
1 parent e3f4b4f commit 67fa29b
Show file tree
Hide file tree
Showing 12 changed files with 224 additions and 210 deletions.
31 changes: 28 additions & 3 deletions bogofilter-wordlist-x/bogofilter-wordlist.spec.in
Expand Up @@ -29,6 +29,7 @@ URL: http://www.indimail.org
Source0: http://downloads.sourceforge.net/indimail/%{name}-%{version}.tar.gz

%if %build_on_obs == 1
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if 0%{?suse_version}
BuildRequires: -post-build-checks
#!BuildIgnore: post-build-checks
Expand All @@ -47,16 +48,40 @@ bogofilter-wordlist provides SPAM database for bogofilter in Berkeley DB format
%setup -q

%build
(
echo "---------------- INFORMATION ------------------------"
echo target %_target
echo target_alias %_target_alias
echo target_cpu %_target_cpu
echo target_os %_target_os
echo target_vendor %_target_vendor
echo Building %{name}-%{version}-%{release} Build %{_build} OS %{_os} lib=%{_lib} libdir=%{_libdir}
echo "------------------------------------------------------"
) > %{name}-rpm.info
(
echo "NAME=%{name}"
echo "Description=\"bogofilter-wordlist Package\""
echo "BOGOFILTER_WORDLIST_version=%{version}-%{release}"
echo "ID=%{name}"
echo "HOME_URL=\"https://github.com/mbhangui/indimail-virtualdomains\""
echo "PACKAGE_BUGREPORT=\"'@email@'\""
) > %{name}-release
%configure --sysconfdir=%{sysconfdir}
make %{?_smp_mflags}
%{__make} %{?_smp_mflags}

%install
[ "$RPM_BUILD_ROOT" != "/" ] && /bin/rm -fr $RPM_BUILD_ROOT
ID=$(id -u)
[ "%{buildroot}" != "/" ] && /bin/rm -fr %{buildroot}
%make_install
%{__mkdir_p} %{buildroot}%{sysconfdir}
install -m 0644 %{name}-rpm.info %{buildroot}%{sysconfdir}/%{name}-rpm.info
install -m 0644 %{name}-release %{buildroot}%{sysconfdir}/%{name}-release
/bin/rm -f %{name}-rpm.info %{name}-release
/bin/rm -f %{name}-rpm.info

%files
%attr(0644,-,-) %config(noreplace) %{sysconfdir}/wordlist.db
%attr(644,root,root) %{sysconfdir}/%{name}-release
%attr(644,root,root) %{sysconfdir}/%{name}-rpm.info

%doc

Expand Down
9 changes: 3 additions & 6 deletions indimail-access/indimail-access.spec.in
Expand Up @@ -135,10 +135,6 @@ Conflicts: indimail < 3.2
%if %build_on_obs == 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
#
# IndiMail is choosy and runs on reliable OS only
#
Excludeos: windows

%description
indimail-access package provides IMAP, POP3 and fetchmail
Expand Down Expand Up @@ -237,6 +233,7 @@ if [ -d fetchmail-%{fetchmail_version} ] ; then
fi

%install
[ "%{buildroot}" != "/" ] && /bin/rm -fr %{buildroot}
cd %{name}-%{version}
for i in fetchmail-%{fetchmail_version} courier-imap-%{courier_version}
do
Expand Down Expand Up @@ -319,8 +316,8 @@ done
%dir %attr(755,root,root) %{mandir}/man7
%dir %attr(755,root,root) %{mandir}/man8
%endif
%attr(444,root,root) %config(noreplace) %{sysconfdir}/%{name}-release
%attr(444,root,root) %config(noreplace) %{sysconfdir}/%{name}-rpm.info
%attr(444,root,root) %{sysconfdir}/%{name}-release
%attr(444,root,root) %{sysconfdir}/%{name}-rpm.info

%dir %attr(755,root,root) %{shareddir}/locale
%ghost %config(noreplace,missingok) %{sysconfdir}/fetchmailrc
Expand Down
31 changes: 4 additions & 27 deletions indimail-auth/indimail-auth.spec.in
Expand Up @@ -101,12 +101,8 @@ Requires(postun): shadow-utils
%endif

%if %build_on_obs == 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%endif
#
# IndiMail is choosy and runs on reliable OS only
#
Excludeos: windows

%description
indimail-auth provides nssd daemon to provide name service switch
Expand Down Expand Up @@ -147,7 +143,6 @@ echo target_cpu %_target_cpu
echo target_os %_target_os
echo target_vendor %_target_vendor
echo PAM Module dir %{pam_moduledir}
echo Project %{_project}
echo Building %{name}-%{version}-%{release} Build %{_build} OS %{_os} lib=%{_lib} libdir=%{_libdir}
echo "------------------------------------------------------"
) > %{name}-rpm.info
Expand Down Expand Up @@ -201,9 +196,8 @@ if [ pam-multi-%{pam_multi_version} ] ; then
fi

%install
[ "%{buildroot}" != "/" ] && /bin/rm -fr %{buildroot}
cd %{name}-%{version}
%{__mkdir_p} $RPM_BUILD_ROOT
%{__mkdir_p} %{buildroot}%{shareddir}/doc
for i in nssd-%{nssd_version} pam-multi-%{pam_multi_version}
do
if [ -d $i ] ; then
Expand Down Expand Up @@ -264,8 +258,8 @@ chmod -R 755 %{buildroot}/%{pam_moduledir}
%endif

%ghost %config(noreplace,missingok) %{sysconfdir}/nssd.conf
%attr(644,root,root) %config(noreplace) %{sysconfdir}/%{name}-rpm.info
%attr(644,root,root) %config(noreplace) %{sysconfdir}/%{name}-release
%attr(644,root,root) %{sysconfdir}/%{name}-rpm.info
%attr(644,root,root) %{sysconfdir}/%{name}-release

%attr(755,root,root) %{_prefix}/sbin/nssd
%attr(755,root,root) %{libexecdir}/check_getpw
Expand Down Expand Up @@ -310,13 +304,6 @@ chmod -R 755 %{buildroot}/%{pam_moduledir}
%{_builddir}/elfbins.list
%endif

%verifyscript
ID=$(id -u)
if [ $ID -ne 0 ] ; then
echo "You are not root" 1>&2
exit 1
fi

### SCRIPTLET ###############################################################################
%pretrans
if [ -d /run ] ; then
Expand All @@ -338,11 +325,6 @@ fi
### SCRIPTLET ###############################################################################
%post
argv1=$1
ID=$(id -u)
if [ $ID -ne 0 ] ; then
echo "You are not root" 1>&2
exit 1
fi
if [ -d /run ] ; then
rundir=/run/svscan
elif [ -d /var/run ] ; then
Expand Down Expand Up @@ -412,11 +394,6 @@ fi
### SCRIPTLET ###############################################################################
%postun
argv1=$1
ID=$(id -u)
if [ $ID -ne 0 ] ; then
echo "You are not root" 1>&2
exit 1
fi
if [ -z "$argv1" ] ; then
argv1=0
fi
Expand Down
34 changes: 6 additions & 28 deletions indimail-spamfilter-x/indimail-spamfilter.spec.in
Expand Up @@ -101,7 +101,7 @@ Requires: indimail-mta
Conflicts: indimail < 3.2

%if %build_on_obs == 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%endif

%description
Expand All @@ -123,20 +123,13 @@ the word lists.
%setup -q

%build
ID=$(id -u)
(
echo "---------------- INFORMATION ------------------------"
echo target %_target
echo target_alias %_target_alias
echo target_cpu %_target_cpu
echo target_os %_target_os
echo target_vendor %_target_vendor
%if 0%{?fedora_version} > 30 || 0%{?centos_version} > 700 || 0%{?rhel_version} > 700 || 0%{?centos_ver} > 7 || 0%{?almalinux_version} > 700 || 0%{?rocky_version} > 700 || 0%{?fedora} > 30 || 0%{?rhel} > 7
echo pythondir %{python3_sitelib}
%else
echo pythondir %{pythondir}
%endif
echo Project %{_project}
echo Building %{name}-%{version}-%{release} Build %{_build} OS %{_os}
echo "------------------------------------------------------"
) > %{name}-rpm.info
Expand Down Expand Up @@ -164,7 +157,7 @@ HOME='.';export HOME
)

%install
ID=$(id -u)
[ "%{buildroot}" != "/" ] && /bin/rm -fr %{buildroot}
%{__make} -s %{?_smp_mflags}
%if %{defined nodebug}
%{__make} -s %{?_smp_mflags} DESTDIR=%{buildroot} install-strip
Expand Down Expand Up @@ -216,11 +209,11 @@ $TOUCH %{buildroot}%{sysconfdir}/bogofilter.cf
%dir %attr(755,root,root) %{mandir}
%dir %attr(755,root,root) %{mandir}/man1
%endif
%attr(644,root,root) %config(noreplace) %{sysconfdir}/%{name}-release
%attr(644,root,root) %config(noreplace) %{sysconfdir}/%{name}-rpm.info
%ghost %config(noreplace,missingok) %{sysconfdir}/bogofilter.cf
%attr(644,root,root) %config(noreplace) %{sysconfdir}/bogofilter.cf.example
%attr(644,root,root) %{sysconfdir}/%{name}-release
%attr(644,root,root) %{sysconfdir}/%{name}-rpm.info
%attr(644,root,root) %config(noreplace) %{sysconfdir}/bogofilter.perms
%ghost %config(noreplace,missingok) %{sysconfdir}/bogofilter.cf
%attr(644,root,root) %{sysconfdir}/bogofilter.cf.example

%if 0%{?suse_version} >= 1120
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/permissions.d/%{name}-permissions
Expand Down Expand Up @@ -264,11 +257,6 @@ $TOUCH %{buildroot}%{sysconfdir}/bogofilter.cf

### SCRIPTLET ###############################################################################
%verifyscript
ID=$(id -u)
if [ $ID -ne 0 ] ; then
echo "You are not root" 1>&2
exit 1
fi

%if 0%{?suse_version} >= 1120
%verify_permissions -e %{_prefix}/bin/bogofilter
Expand All @@ -277,11 +265,6 @@ fi
### SCRIPTLET ###############################################################################
%post
argv1=$1
ID=$(id -u)
if [ $ID -ne 0 ] ; then
echo "You are not root" 1>&2
exit 1
fi
if [ -x /bin/touch ] ; then
TOUCH=/bin/touch
elif [ -x /usr/bin/touch ] ; then
Expand Down Expand Up @@ -416,11 +399,6 @@ fi
### SCRIPTLET ###############################################################################
%postun
argv1=$1
ID=$(id -u)
if [ $ID -ne 0 ] ; then
echo "You are not root" 1>&2
exit 1
fi
if [ -z "$argv1" ] ; then
argv1=0
fi
Expand Down
19 changes: 5 additions & 14 deletions indimail-utils/indimail-utils.spec.in
Expand Up @@ -94,12 +94,8 @@ Requires: coreutils grep /bin/sh glibc
Conflicts: indimail < 3.2

%if %build_on_obs == 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%endif
#
# IndiMail is choosy and runs on reliable OS only
#
Excludeos: windows

%description
indimail-utils provides a package consisting of utilities like
Expand Down Expand Up @@ -139,7 +135,6 @@ echo target_alias %_target_alias
echo target_cpu %_target_cpu
echo target_os %_target_os
echo target_vendor %_target_vendor
echo Project %{_project}
echo Building %{name}-%{version}-%{release} Build %{_build} OS %{_os} lib=%{_lib} libdir=%{_libdir}
echo "------------------------------------------------------"
) > %{name}-rpm.info
Expand Down Expand Up @@ -171,8 +166,9 @@ do
done

%install
[ "%{buildroot}" != "/" ] && /bin/rm -fr %{buildroot}
cd %{name}-%{version}
%{__mkdir_p} $RPM_BUILD_ROOT%{_prefix}
%{__mkdir_p} %{buildroot}%{_prefix}
for i in altermime-%{altermime_version} ripmime-%{ripmime_version} \
fortune-%{fortune_version} mpack-%{mpack_version} flash-%{flash_version}
do
Expand Down Expand Up @@ -242,8 +238,8 @@ fi
%attr(644,root,root) %config(noreplace) %{sysconfdir}/system.rc
%attr(644,root,root) %config(noreplace) %{sysconfdir}/system.menu
%attr(644,root,root) %config(noreplace) %{sysconfdir}/system.module
%attr(644,root,root) %config(noreplace) %{sysconfdir}/%{name}-release
%attr(644,root,root) %config(noreplace) %{sysconfdir}/%{name}-rpm.info
%attr(644,root,root) %{sysconfdir}/%{name}-release
%attr(644,root,root) %{sysconfdir}/%{name}-rpm.info

# indimail binaries
%attr(755,root,root) %{_prefix}/bin/altermime
Expand Down Expand Up @@ -413,11 +409,6 @@ fi

### SCRIPTLET ###############################################################################
%verifyscript
ID=$(id -u)
if [ $ID -ne 0 ] ; then
echo "You are not root" 1>&2
exit 1
fi

# fix changelog for openSUSE buildservice
%changelog
19 changes: 5 additions & 14 deletions indimail-x/indimail.spec.in
Expand Up @@ -184,12 +184,8 @@ Requires: policycoreutils-python
Requires: indimail-access

%if %build_on_obs == 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%endif
#
# IndiMail is choosy and runs on reliable OS only
#
Excludeos: windows

%description
IndiMail is a messaging platform providing multi-cluster domain support.
Expand Down Expand Up @@ -236,7 +232,6 @@ echo target_alias %_target_alias
echo target_cpu %_target_cpu
echo target_os %_target_os
echo target_vendor %_target_vendor
echo Project %{_project}
echo Building %{name}-%{version}-%{release} Build %{_build} OS %{_os} lib=%{_lib} libdir=%{_libdir}
echo "------------------------------------------------------"
) > %{name}-rpm.info
Expand Down Expand Up @@ -269,6 +264,7 @@ fi
--enable-default-domain=${default_domain} `%{__cat} config/indimail.opts`

%install
[ "%{buildroot}" != "/" ] && /bin/rm -fr %{buildroot}
%if 0%{?suse_version} >= 1120
%if 0%{?build_cflags:1}
CFLAGS="%{build_cflags} -fPIC -fno-lto"
Expand Down Expand Up @@ -434,14 +430,14 @@ done
#
%ghost %attr(0644,root,root) %{sysconfdir}/indimail.pp
%ghost %attr(0644,root,root) %{sysconfdir}/indimail.mod
%attr(444,root,root) %{sysconfdir}/indimail.perms

%attr(444,root,root) %{sysconfdir}/%{name}-release
%attr(444,root,root) %{sysconfdir}/%{name}-rpm.info
%attr(444,root,root) %config(noreplace) %{sysconfdir}/cronlist.i
%attr(444,root,root) %config(noreplace) %{sysconfdir}/indimail.mrtg.cfg
%attr(444,root,root) %config(noreplace) %{sysconfdir}/headerlist
%attr(444,root,root) %config(noreplace) %{sysconfdir}/indimail.settings
%attr(444,root,root) %config(noreplace) %{sysconfdir}/%{name}-release
%attr(444,root,root) %config(noreplace) %{sysconfdir}/%{name}-rpm.info
%attr(444,root,root) %config(noreplace) %{sysconfdir}/indimail.perms
%attr(444,root,root) %config(noreplace) %{sysconfdir}/indimail.schema

%attr(644,root,root) %config(noreplace) %{sysconfdir}/indimail.te
Expand Down Expand Up @@ -869,11 +865,6 @@ done

### SCRIPTLET ###############################################################################
%verifyscript
ID=$(id -u)
if [ $ID -ne 0 ] ; then
echo "You are not root" 1>&2
exit 1
fi
%{_prefix}/sbin/svctool --check-install --servicedir=%{servicedir} \
--qbase=%{qbase} --qcount=%{qcount} --qstart=1

Expand Down

0 comments on commit 67fa29b

Please sign in to comment.