%undefine _missing_build_ids_terminate_build %define _unpackaged_files_terminate_build 1 %if %{defined nodebug} %global debug_package %{nil} %endif %if %{defined _project} # define if building on openSUSE build service %define build_on_obs 1 %else %define _project local %define build_on_obs 0 %global _hardened_build 1 %endif %global _prefix /usr %global ezcgidir /var/www/cgi-bin %global mandir %{_prefix}/share/man %global ezdocdir %{_prefix}/share/doc/ezmlm-idx %global sysconfdir /etc/indimail %global rcdir %{sysconfdir}/ezmlm %global ezmlmlibdir %{_prefix}/lib/indimail/ezmlm %if %build_on_obs == 1 %global packager Manvendra Bhangui > %endif Name: ezmlm-idx Version: 7.2.4 Release: 1.1%{?dist} Summary: Easy Mailing List Manager + IDX for indimail-mta %if %build_on_obs == 1 License: GPL-2.0+ %else License: GPLv2 %endif Group: Utilities/System %if %{defined mgaversion} BuildRequires: lib64sqlite3-devel BuildArch: x86_64 %else BuildRequires: sqlite-devel %endif %if %{defined amzn} BuildRequires: mariadb-connector-c-devel %else BuildRequires: mysql-devel %endif BuildRequires: postgresql-devel libqmail-devel BuildRequires: rpm >= 3.0.2 gcc gcc-c++ make BuildRequires: sed findutils diffutils gzip coreutils grep BuildRequires: glibc glibc-devel binutils %if %{defined centos_version} BuildRequires: chkconfig %endif ##################################### OBS #################################### %if %build_on_obs == 1 %if 0%{?rhel_version} == 700 BuildRequires: groff-base %else BuildRequires: groff %endif %if 0%{?suse_version} BuildRequires: -post-build-checks #!BuildIgnore: post-build-checks %endif ############################################################################## %else BuildRequires: groff %endif Requires: rpm >= 3.0.2 Requires: indimail-mta >= 2.0 Source0: http://downloads.sourceforge.net/indimail/%{name}-%{version}.tar.gz URL: https://untroubled.org/ezmlm/ %description ezmlm lets users set up their own mailing lists within qmail's address hierarchy. A user, Joe, types ezmlm-make ~/SOS ~/.qmail-sos joe-sos isp.net and instantly has a functioning mailing list, joe-sos@isp.net, with all relevant information stored in a new ~/SOS directory. ezmlm sets up joe-sos-subscribe and joe-sos-unsubscribe for automatic processing of subscription and unsubscription requests. Any message to joe-sos-subscribe will work; Joe doesn't have to explain any tricky command formats. ezmlm will send back instructions if a subscriber sends a message to joe-sos-request or joe-sos-help. ezmlm automatically archives new messages. Messages are labelled with sequence numbers; a subscriber can fetch message 123 by sending mail to joe-sos-get.123. The archive format supports fast message retrieval even when there are thousands of messages. ezmlm takes advantage of qmail's VERPs to reliably determine the recipient address and message number for every incoming bounce message. It waits ten days and then sends the subscriber a list of message numbers that bounced. If that warning bounces, ezmlm sends a probe; if the probe bounces, ezmlm automatically removes the subscriber from the mailing list. ezmlm is easy for users to control. Joe can edit ~/SOS/text/* to change any of the administrative messages sent to subscribers. He can remove ~/SOS/public and ~/SOS/archived to disable automatic subscription and archiving. He can put his own address into ~/SOS/editor to set up a moderated mailing list. He can edit ~/SOS/{headeradd,headerremove} to control outgoing headers. ezmlm has several utilities to manually inspect and manage mailing lists. ezmlm uses Delivered-To to stop forwarding loops, Mailing-List to protect other mailing lists against false subscription requests, and real cryptographic cookies to protect normal users against false subscription requests. ezmlm can also be used for a sublist, redistributing messages from another list. ezmlm is reliable, even in the face of system crashes. It writes each new subscription and each new message safely to disk before it reports success to qmail. ezmlm doesn't mind huge mailing lists. Lists don't even have to fit into memory. ezmlm hashes the subscription list into a set of independent files so that it can handle subscription requests quickly. ezmlm uses qmail for blazingly fast parallel SMTP deliveries. The IDX patches add: Indexing, (Remote) Moderation, digest, make patches, multi-language, MIME, global interface, SQL database support. %description -l pl Menader pocztowych list dyskusyjnych, cakowicie spolszczony, moliwo zdalnego moderowania, MIME. %package mysql Summary: MySQL support module for ezmlm-idx Group: Utilities/System Requires: ezmlm-idx Conflicts: ezmlm ezmlm-idx-std ezmlm-idx-mysql < 6.0 %description mysql MySQL support module for ezmlm-idx. Provides sub-mysql.so module %package pgsql Summary: PostgreSQL support module for ezmlm-idx Group: Utilities/System Requires: ezmlm-idx Conflicts: ezmlm ezmlm-idx-std ezmlm-idx-pgsql < 6.0 %description pgsql PostgreSQL support module for ezmlm-idx. Provides sub-pgsql.so module %package sqlite3 Summary: SQLite3 support module for ezmlm-idx Group: Utilities/System Requires: ezmlm-idx Conflicts: ezmlm ezmlm-idx-std ezmlm-idx-pgsql < 6.0 %description sqlite3 SQLite3 support module for ezmlm-idx. Provides sub-sqlite3.so module %package cgi Prefix: %{ezcgidir} Summary: Web archiver for %name Group: Utilities/System Requires: ezmlm-idx %description cgi www archiver for %name. %prep %setup -q %build echo %{sysconfdir} >conf-sysconfdir echo %{_libexecdir} >conf-libexec echo %{_prefix} >conf-prefix echo %{_bindir} >conf-bin echo %{_sbindir} >conf-sbin echo %{mandir} >conf-man echo %{ezmlmlibdir} >conf-lib ( echo "NAME=%{name}" echo "Description=\"Easy MailingList Manager for indimail-mta\"" echo "ezmlm-idx_version="%{version}-%{release}"" echo "ID=%{name}" echo "HOME_URL=\"https://github.com/indimail/ezmlm-idx\"" echo "PACKAGE_BUGREPORT=\"'Manvendra Bhangui '\"" ) > %{name}-release %if 0%{?build_cflags:1} echo %{_cc} -g %{build_cflags} -Wall -fPIC -O2 -Wno-array-parameter -I%{_includedir}/mysql -I%{_includedir}/pgsql -I/usr/include/qmail> conf-cc %else echo %{_cc} -g %{optflags} -Wall -fPIC -O2 -Wno-array-parameter -I%{_includedir}/mysql -I%{_includedir}/pgsql -I/usr/include/qmail > conf-cc %endif %if %{defined nodebug} echo %{__cc} -rdynamic -fPIE -pie -L%{_libdir}/mysql -L. -s > conf-ld %else echo %{__cc} -rdynamic -fPIE -pie -L%{_libdir}/mysql -L. > conf-ld %endif %if 0%{?build_cflags:1} CFLAGS="%{build_cflags}" %else CFLAGS="%{optflags}" %endif %if 0%{?build_ldflags:1} LDFLAGS="%{build_ldflags} $LDFLAGS" %endif %{__make} SYSTEM=LINUX -s %{?_smp_mflags} CC="%{__cc}" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" all # Create INSTALL file for how to set up ezmlm-cgi #( #echo "The binary ezmlm-cgi is installed as %%{ezcgidir}/ezmlm-cgi with" #echo "permissions 04555." #echo "" #echo "Please see INSTALL.source 13-19) in this package's doc directory and the" #echo "man page ezmlm-cgi.1 for more details on setting up and using ezmlm-cgi." #echo "" #) > INSTALL.cgi %install %{__mkdir_p} %{buildroot}%{_bindir} %{__mkdir_p} %{buildroot}%{_sbindir} %{__mkdir_p} %{buildroot}%{ezmlmlibdir} %{__mkdir_p} %{buildroot}%{_libexecdir}/ezmlm %{__mkdir_p} %{buildroot}%{rcdir} %{__mkdir_p} %{buildroot}%{rcdir}/global_vars %{__mkdir_p} %{buildroot}%{ezcgidir} %{__mkdir_p} %{buildroot}%{ezdocdir} %{__mkdir_p} %{buildroot}%{mandir} ./installer %buildroot%{rcdir} < ETC ./installer %buildroot%{_bindir} < BIN ./installer %buildroot%{_sbindir} < SBIN ./installer %buildroot%{mandir} < MAN ./installer %buildroot%_prefix/lib/indimail/ezmlm < LIB ./installer %buildroot%_libexecdir/ezmlm < LIBEXEC %{__mv} %{buildroot}%{_bindir}/ezmlm-cgi %{buildroot}%{ezcgidir}/ezmlm-cgi %{__mv} %{name}-release %{buildroot}%{rcdir} ln -s `head -n 1 conf-lang` %{buildroot}/%{rcdir}/default # copy documents for i in BLURB CHANGES FAQ README README.mysql README.pgsql README.std \ THANKS TODO UPGRADE doc/ChangeLog INSTALL.cgi ezcgirc ezcgi.css LICENSE \ INSTALL.source do install -m 0644 $i %{buildroot}%{ezdocdir} done %if %{undefined nodebug} /bin/chmod -R 755 %{buildroot}%{_prefix}/bin /bin/chmod -R 755 %{buildroot}%{_prefix}/sbin /bin/chmod -R 755 %{buildroot}%{ezcgidir} /bin/chmod -R 755 %{buildroot}%{_prefix}/lib/indimail/ezmlm %endif %post echo For currently supported languages, see the INSTALL echo file, section 7. %{__mkdir_p} %{rcdir}/global_vars if [ -d %{sysconfdir}/control/global_vars ] ; then if [ ! -L %{rcdir}/global_vars/.envdir -a ! -f %{rcdir}/global_vars/.envdir ] ; then ln -srf %{sysconfdir}/control/global_vars %{rcdir}/global_vars/.envdir fi for i in QUEUE_BASE QUEUE_COUNT QUEUE_START do %{__rm} -f %{rcdir}/global_vars/$i done else for i in QUEUE_BASE QUEUE_COUNT QUEUE_START do if [ ! -f %{rcdir}/global_vars/$i -a ! -L %{rcdir}/global_vars/$i ] ; then ln -srf %{sysconfdir}/control/defaultqueue/$i %{rcdir}/global_vars/$i fi done fi %postun # we are doing erase if [ $1 -eq 0 ] ; then for i in QUEUE_BASE QUEUE_COUNT QUEUE_START do %{__rm} -f %{rcdir}/global_vars/$i done rmdir --ignore-fail-on-non-empty %{rcdir}/global_vars 2>/dev/null || true fi %files %defattr(-,root,root) %dir %rcdir %dir %{_prefix}/lib/indimail/ezmlm %config(noreplace) %rcdir/* %attr(644,root,root) %{ezdocdir}/LICENSE %attr(644,root,root) %{ezdocdir}/BLURB %attr(644,root,root) %{ezdocdir}/CHANGES* %attr(644,root,root) %{ezdocdir}/FAQ %attr(644,root,root) %{ezdocdir}/INSTALL.source %attr(644,root,root) %{ezdocdir}/README* %attr(644,root,root) %{ezdocdir}/THANKS %attr(644,root,root) %{ezdocdir}/TODO %attr(644,root,root) %{ezdocdir}/UPGRADE %attr(644,root,root) %{ezdocdir}/ChangeLog %{_bindir}/* %{_sbindir}/* %{_libexecdir}/ezmlm/* %{_prefix}/lib/indimail/ezmlm/sub-std.so %{mandir}/man1/ezmlm-accept.1.* %{mandir}/man1/ezmlm-archive.1.* %{mandir}/man1/ezmlm-cgi.1.* %{mandir}/man1/ezmlm-check.1.* %{mandir}/man1/ezmlm-checksub.1.* %{mandir}/man1/ezmlm-clean.1.* %{mandir}/man1/ezmlm-confirm.1.* %{mandir}/man1/ezmlm-cron.1.* %{mandir}/man1/ezmlm-dispatch.1.* %{mandir}/man1/ezmlm-gate.1.* %{mandir}/man1/ezmlm-get.1.* %{mandir}/man1/ezmlm-glconf.1.* %{mandir}/man1/ezmlm-idx.1.* %{mandir}/man1/ezmlm-import.1.* %{mandir}/man1/ezmlm-issubn.1.* %{mandir}/man1/ezmlm-limit.1.* %{mandir}/man1/ezmlm-list.1.* %{mandir}/man1/ezmlm-make.1.* %{mandir}/man1/ezmlm-manage.1.* %{mandir}/man1/ezmlm-moderate.1.* %{mandir}/man1/ezmlm-reject.1.* %{mandir}/man1/ezmlm-request.1.* %{mandir}/man1/ezmlm-return.1.* %{mandir}/man1/ezmlm-rmtab.1.* %{mandir}/man1/ezmlm-send.1.* %{mandir}/man1/ezmlm-split.1.* %{mandir}/man1/ezmlm-store.1.* %{mandir}/man1/ezmlm-sub.1.* %{mandir}/man1/ezmlm-tstdig.1.* %{mandir}/man1/ezmlm-unsub.1.* %{mandir}/man1/ezmlm-warn.1.* %{mandir}/man1/ezmlm-weed.1.* %{mandir}/man1/ezmlm-queue.1.* %{mandir}/man5/ezmlm.5.* %{mandir}/man5/ezmlmglrc.5.* %{mandir}/man5/ezmlmrc.5.* %{mandir}/man5/ezmlmsubrc.5.* %files cgi %defattr(-,root,root) %attr(4555,root,root) %{ezcgidir}/ezmlm-cgi %attr(644,root,root) %{ezdocdir}/INSTALL.cgi %attr(644,root,root) %{ezdocdir}/ezcgirc %attr(644,root,root) %{ezdocdir}/ezcgi.css %{mandir}/man1/ezmlm-cgi.1* %files mysql %defattr(-,root,root) %{_prefix}/lib/indimail/ezmlm/sub-mysql.so %attr(644,root,root) %{ezdocdir}/README.mysql %files pgsql %defattr(-,root,root) %{_prefix}/lib/indimail/ezmlm/sub-pgsql.so %attr(644,root,root) %{ezdocdir}/README.pgsql %files sqlite3 %defattr(-,root,root) %{_prefix}/lib/indimail/ezmlm/sub-sqlite3.so %changelog * Thu May 09 2024 18:52:58 +0000 Manvendra Bhangui 7.2.4-1.1%{?dist} Release 7.2.4 Start 05/02/2024 End XX/XX/XXXX - ezmlm-send.c: Bug - fixed Date not getting extracted due to FWS being ignored. - ezmlm-idx.spec, debian/ezmlm-idx.postinst: create .envdir link in /etc/indimail/ezmlm/global_vars during install/upgrade - qmail.c: restore EZMLM_ETC, EZMLMQUEUE, QMAILQUEUE when clearing variables before reading ezmlm/global_vars - updated multiple man pages - qmail.c: changed for envdir.c change in libqmail