# # # $Id: indimail.spec.in,v 1.41 2020-05-30 19:56:02+05:30 Cprogrammer Exp mbhangui $ %undefine _missing_build_ids_terminate_build %global _unpackaged_files_terminate_build 1 %if %{defined _project} # define if building on openSUSE build service %global build_on_obs 1 %global build_cflags "-DOBS_BUILD %{build_cflags}" %else %define _project local %global build_on_obs 0 %global _hardened_build 1 %endif #global nodebug 1 %if %{defined nodebug} %global debug_package %{nil} %endif %global _prefix /usr %global sysconfdir /etc/indimail %global shareddir /usr/share/indimail %global mandir /usr/share/man %global imoduledir %{_prefix}/lib/indimail/modules %global altermime_version 0.3.10 %global ripmime_version 1.4.0.10 %global fortune_version 1.1.0 %global mpack_version 1.6.0 %global flash_version 0.9.4 %global url https://github.com/mbhangui/indimail-virtualdomains # Packages which do not use autosetup or setup macro # in the prep section have a problem in enabling debuginfo. # This isn't documented clearly anywhere. A workaround is # to define buildsubdir %if %{undefined nodebug} %global buildsubdir %{name}-%{version} %endif %if %build_on_obs == 1 %global packager Manvendra Bhangui > %endif Summary: Mail Utility Package for indimail MTA Name: indimail-utils Version: 1.0.0 Release: 1.1%{?dist} %if %build_on_obs == 1 License: GPL-3.0+ %else License: GPLv3 %endif %if %{undefined suse_version} && %{undefined sles_version} Group: System Environment/Base %else Group: Productivity/Networking/Email/Servers %endif Source1: http://downloads.sourceforge.net/indimail/altermime-%{altermime_version}.tar.gz Source2: http://downloads.sourceforge.net/indimail/ripmime-%{ripmime_version}.tar.gz Source3: http://downloads.sourceforge.net/indimail/fortune-%{fortune_version}.tar.gz Source4: http://downloads.sourceforge.net/indimail/mpack-%{mpack_version}.tar.gz Source5: http://downloads.sourceforge.net/indimail/flash-%{flash_version}.tar.gz Source6: http://downloads.sourceforge.net/indimail/indimail-utils-rpmlintrc URL: https://github.com/mbhangui/indimail-virtualdomains AutoReqProv: Yes # few binaries were moved to sbin and indimail >= 2.5 depends on that BuildRequires: rpm gcc gcc-c++ make coreutils grep BuildRequires: glibc glibc-devel binutils BuildRequires: gzip autoconf automake libtool #flash, osh BuildRequires: readline-devel readline ncurses-devel BuildRequires: sed findutils ################################# OBS ############################### %if %build_on_obs == 1 %if 0%{?suse_version} BuildRequires: -post-build-checks #!BuildIgnore: post-build-checks #!BuildIgnore: brp-check-suse %endif %endif ################################# OBS ############################### Requires: /usr/bin/awk /usr/bin/which Requires: sed findutils Requires: coreutils grep /bin/sh glibc Conflicts: indimail < 3.2 %description indimail-utils provides a package consisting of utilities like mpack, munpack, altermime, ripmime, fortune, flash. For more details visit %{url} %prep %{__mkdir_p} %{_builddir}/%{name}-%{version} cd %{_builddir}/%{name}-%{version} for i in altermime-%{altermime_version} ripmime-%{ripmime_version} \ fortune-%{fortune_version} mpack-%{mpack_version} flash-%{flash_version} do ( if [ -d $i ] ; then %{__rm} -rf $i fi if [ -f ../../SOURCES/$i.tar.bz2 ] ; then %{__bzip2} -d -c ../../SOURCES/$i.tar.bz2 | tar xf - elif [ -f ../../SOURCES/$i.tar.xz ] ; then xz -d -c ../../SOURCES/$i.tar.xz |tar xf - elif [ -f ../../SOURCES/$i.tar.gz ] ; then gunzip -c ../../SOURCES/$i.tar.gz | tar xf - else echo "No Source Archive for $i" exit 1 fi ) done %build cd %{_builddir}/%{name}-%{version} ( 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=\"indimail utils package\"" echo "indimail-util-version=%{version}-%{release}" echo "ID=%{name}" echo "HOME_URL=\"https://github.com/mbhangui/indimail-virtualdomains\"" echo "PACKAGE_BUGREPORT=\"'Manvendra Bhangui '\"" ) > %{name}-release extra_opt="" for i in altermime-%{altermime_version} ripmime-%{ripmime_version} \ fortune-%{fortune_version} mpack-%{mpack_version} flash-%{flash_version} do if [ -d $i ] ; then cd $i extra_opt="" if [ " $i" = " flash-%{flash_version}" ] ; then extra_opt="--sysconfdir=%{sysconfdir} --enable-modbase=%{_prefix}/lib/indimail" elif [ " $i" = " fortune-%{fortune_version}" ] ; then extra_opt="--enable-cookiedir=%{shareddir}/fortunes --enable-offensive=n" fi %configure --prefix=%{_prefix} --mandir=%{mandir} \ --datarootdir=%{shareddir} $extra_opt cd .. fi done %install cd %{_builddir}/%{name}-%{version} for i in altermime-%{altermime_version} ripmime-%{ripmime_version} \ fortune-%{fortune_version} mpack-%{mpack_version} flash-%{flash_version} do if [ -d $i ] ; then cd $i %{__make} -s %{?_smp_mflags} %if %{defined nodebug} %{__make} -s %{?_smp_mflags} DESTDIR=%{buildroot} install-strip %else %{__make} -s %{?_smp_mflags} DESTDIR=%{buildroot} install %endif cd .. fi done %{__mkdir_p} %{buildroot}%{sysconfdir} install -m 0644 %{name}-rpm.info %{buildroot}%{sysconfdir}/%{name}-rpm.info install -m 0644 %{name}-release %{buildroot}%{sysconfdir}/%{name}-release %{__rm} -f %{name}-rpm.info %{name}-release # # remove devel # %{__rm} -f %{buildroot}%{_libdir}/libflash.la %{__rm} -f %{buildroot}%{_libdir}/libflash.a %{__rm} -f %{buildroot}%{_libdir}/libflash.so %{__rm} -rf %{buildroot}%{_includedir} if [ -x /usr/bin/chrpath ] ; then if [ -f %{buildroot}%{_prefix}/bin/flash ] ; then /usr/bin/chrpath -d %{buildroot}%{_prefix}/bin/flash fi for i in background alarms countdown do if [ -f %{buildroot}%{imoduledir}/$i ] ; then /usr/bin/chrpath -d %{buildroot}%{imoduledir}/$i fi done fi # Compress the man pages find %{buildroot}%{mandir} -type f -exec gzip -q {} \; %if %{undefined nodebug} /bin/chmod -R 0755 %{buildroot}%{_prefix}/bin %{buildroot}%{_prefix}/sbin ln -sf %{_builddir}/%{name}-%{version}/debugsourcefiles.list %{_builddir}/debugsourcefiles.list ln -sf %{_builddir}/%{name}-%{version}/debugsources.list %{_builddir}/debugsources.list ln -sf %{_builddir}/%{name}-%{version}/debugfiles.list %{_builddir}/debugfiles.list %endif %files %defattr(-, root, root,-) # # Directories # # opensuse requres ghost files to be present %dir %attr(755,root,root) %{_prefix}/lib/indimail/modules %if "%{mandir}" != "/usr/share/man" %dir %attr(755,root,root) %{mandir} %dir %attr(755,root,root) %{mandir}/man1 %endif %if "%{_prefix}" != "/usr" %dir %attr(755,root,root) %{_libdir} %endif %dir %attr(755,root,root) %{shareddir}/fortunes %attr(644,root,root) %config(noreplace) %{sysconfdir}/system.flashlogin %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) %{sysconfdir}/%{name}-release %attr(644,root,root) %{sysconfdir}/%{name}-rpm.info # indimail binaries %attr(755,root,root) %{_prefix}/bin/altermime %attr(755,root,root) %{_prefix}/bin/randstr %attr(755,root,root) %{_prefix}/bin/ripmime %attr(755,root,root) %{_prefix}/bin/mpack %attr(755,root,root) %{_prefix}/bin/munpack %attr(755,root,root) %{_prefix}/bin/fortune %attr(755,root,root) %{_prefix}/sbin/rot %attr(755,root,root) %{_prefix}/sbin/strfile %attr(755,root,root) %{_prefix}/sbin/unstr %attr(755,root,root) %{_prefix}/bin/flash %attr(755,root,root) %{_prefix}/bin/ripole %attr(755,root,root) %{imoduledir}/background %attr(755,root,root) %{imoduledir}/alarms %attr(755,root,root) %{imoduledir}/countdown %attr(644,root,root) %{shareddir}/fortunes/definitions %attr(644,root,root) %{shareddir}/fortunes/linux.dat %attr(644,root,root) %{shareddir}/fortunes/food %attr(644,root,root) %{shareddir}/fortunes/medicine %attr(644,root,root) %{shareddir}/fortunes/magic %attr(644,root,root) %{shareddir}/fortunes/ethnic %attr(644,root,root) %{shareddir}/fortunes/art.dat %attr(644,root,root) %{shareddir}/fortunes/computers.dat %attr(644,root,root) %{shareddir}/fortunes/songs-poems.dat %attr(644,root,root) %{shareddir}/fortunes/kids %attr(644,root,root) %{shareddir}/fortunes/goedel %attr(644,root,root) %{shareddir}/fortunes/paradoxum %attr(644,root,root) %{shareddir}/fortunes/computers %attr(644,root,root) %{shareddir}/fortunes/goedel.dat %attr(644,root,root) %{shareddir}/fortunes/news %attr(644,root,root) %{shareddir}/fortunes/pets %attr(644,root,root) %{shareddir}/fortunes/law.dat %attr(644,root,root) %{shareddir}/fortunes/zippy %attr(644,root,root) %{shareddir}/fortunes/miscellaneous %attr(644,root,root) %{shareddir}/fortunes/ascii-art.dat %attr(644,root,root) %{shareddir}/fortunes/perl %attr(644,root,root) %{shareddir}/fortunes/kids.dat %attr(644,root,root) %{shareddir}/fortunes/love.dat %attr(644,root,root) %{shareddir}/fortunes/work.dat %attr(644,root,root) %{shareddir}/fortunes/humorists %attr(644,root,root) %{shareddir}/fortunes/definitions.dat %attr(644,root,root) %{shareddir}/fortunes/drugs %attr(644,root,root) %{shareddir}/fortunes/education.dat %attr(644,root,root) %{shareddir}/fortunes/politics.dat %attr(644,root,root) %{shareddir}/fortunes/science.dat %attr(644,root,root) %{shareddir}/fortunes/love %attr(644,root,root) %{shareddir}/fortunes/men-women %attr(644,root,root) %{shareddir}/fortunes/ascii-art %attr(644,root,root) %{shareddir}/fortunes/humorists.dat %attr(644,root,root) %{shareddir}/fortunes/platitudes.dat %attr(644,root,root) %{shareddir}/fortunes/debian %attr(644,root,root) %{shareddir}/fortunes/sports.dat %attr(644,root,root) %{shareddir}/fortunes/riddles %attr(644,root,root) %{shareddir}/fortunes/law %attr(644,root,root) %{shareddir}/fortunes/knghtbrd.dat %attr(644,root,root) %{shareddir}/fortunes/sports %attr(644,root,root) %{shareddir}/fortunes/perl.dat %attr(644,root,root) %{shareddir}/fortunes/tao.dat %attr(644,root,root) %{shareddir}/fortunes/linuxcookie %attr(644,root,root) %{shareddir}/fortunes/linuxcookie.dat %attr(644,root,root) %{shareddir}/fortunes/riddles.dat %attr(644,root,root) %{shareddir}/fortunes/medicine.dat %attr(644,root,root) %{shareddir}/fortunes/fortunes %attr(644,root,root) %{shareddir}/fortunes/cookie %attr(644,root,root) %{shareddir}/fortunes/cookie.dat %attr(644,root,root) %{shareddir}/fortunes/art %attr(644,root,root) %{shareddir}/fortunes/politics %attr(644,root,root) %{shareddir}/fortunes/songs-poems %attr(644,root,root) %{shareddir}/fortunes/startrek.dat %attr(644,root,root) %{shareddir}/fortunes/men-women.dat %attr(644,root,root) %{shareddir}/fortunes/kernelnewbies %attr(644,root,root) %{shareddir}/fortunes/fortunes.dat %attr(644,root,root) %{shareddir}/fortunes/magic.dat %attr(644,root,root) %{shareddir}/fortunes/science %attr(644,root,root) %{shareddir}/fortunes/platitudes %attr(644,root,root) %{shareddir}/fortunes/kernelnewbies.dat %attr(644,root,root) %{shareddir}/fortunes/literature.dat %attr(644,root,root) %{shareddir}/fortunes/translate-me %attr(644,root,root) %{shareddir}/fortunes/startrek %attr(644,root,root) %{shareddir}/fortunes/drugs.dat %attr(644,root,root) %{shareddir}/fortunes/zippy.dat %attr(644,root,root) %{shareddir}/fortunes/linux %attr(644,root,root) %{shareddir}/fortunes/work %attr(644,root,root) %{shareddir}/fortunes/literature %attr(644,root,root) %{shareddir}/fortunes/knghtbrd %attr(644,root,root) %{shareddir}/fortunes/news.dat %attr(644,root,root) %{shareddir}/fortunes/paradoxum.dat %attr(644,root,root) %{shareddir}/fortunes/bofh-excuses.dat %attr(644,root,root) %{shareddir}/fortunes/translate-me.dat %attr(644,root,root) %{shareddir}/fortunes/miscellaneous.dat %attr(644,root,root) %{shareddir}/fortunes/rj.dat %attr(644,root,root) %{shareddir}/fortunes/debian.dat %attr(644,root,root) %{shareddir}/fortunes/tao %attr(644,root,root) %{shareddir}/fortunes/food.dat %attr(644,root,root) %{shareddir}/fortunes/ethnic.dat %attr(644,root,root) %{shareddir}/fortunes/people.dat %attr(644,root,root) %{shareddir}/fortunes/people %attr(644,root,root) %{shareddir}/fortunes/wisdom.dat %attr(644,root,root) %{shareddir}/fortunes/rj %attr(644,root,root) %{shareddir}/fortunes/wisdom %attr(644,root,root) %{shareddir}/fortunes/pets.dat %attr(644,root,root) %{shareddir}/fortunes/bofh-excuses %attr(644,root,root) %{shareddir}/fortunes/education %attr(644,root,root) %{shareddir}/fortunes/age %attr(644,root,root) %{shareddir}/fortunes/age.dat %attr(644,root,root) %{shareddir}/fortunes/chanakya %attr(644,root,root) %{shareddir}/fortunes/chanakya.dat %attr(644,root,root) %{shareddir}/fortunes/joel-on-software %attr(644,root,root) %{shareddir}/fortunes/joel-on-software.dat %attr(644,root,root) %{shareddir}/fortunes/osp %attr(644,root,root) %{shareddir}/fortunes/osp.dat %attr(644,root,root) %{shareddir}/fortunes/paul-graham %attr(644,root,root) %{shareddir}/fortunes/paul-graham.dat %attr(644,root,root) %{shareddir}/fortunes/thirukkural %attr(644,root,root) %{shareddir}/fortunes/thirukkural.dat %attr(644,root,root) %{shareddir}/fortunes/vedas-1 %attr(644,root,root) %{shareddir}/fortunes/vedas-1.dat %attr(644,root,root) %{shareddir}/fortunes/vedas-2 %attr(644,root,root) %{shareddir}/fortunes/vedas-2.dat %docdir %{shareddir}/doc %docdir %{mandir} %attr(644,root,root) %{mandir}/man[1,5,7,8]/* %if %build_on_obs == 0 %license %attr(644,root,root) %{shareddir}/doc/LICENSE-altermime %license %attr(644,root,root) %{shareddir}/doc/LICENSE-ripmime %license %attr(644,root,root) %{shareddir}/doc/COPYING-flash %license %attr(644,root,root) %{shareddir}/doc/COPYING-fortune %license %attr(644,root,root) %{shareddir}/doc/COPYRIGHT-mpack %else %attr(644,root,root) %{shareddir}/doc/LICENSE-altermime %attr(644,root,root) %{shareddir}/doc/LICENSE-ripmime %attr(644,root,root) %{shareddir}/doc/COPYING-flash %attr(644,root,root) %{shareddir}/doc/COPYING-fortune %attr(644,root,root) %{shareddir}/doc/COPYRIGHT-mpack %endif %attr(644,root,root) %{shareddir}/doc/AUTHORS-altermime %attr(644,root,root) %{shareddir}/doc/AUTHORS-ripmime %attr(644,root,root) %{shareddir}/doc/AUTHORS-flash %attr(644,root,root) %{shareddir}/doc/AUTHORS-fortune %attr(644,root,root) %{shareddir}/doc/README-altermime.md %attr(644,root,root) %{shareddir}/doc/README-ripmime.md %attr(644,root,root) %{shareddir}/doc/README-fortune.md %attr(644,root,root) %{shareddir}/doc/README-flash.md %attr(644,root,root) %{shareddir}/doc/README-mpack.md # Shared libraries (omit for architectures that don't support them) %{_libdir}/libflash.so.1 %{_libdir}/libflash.so.1.0.0 %clean %if %{undefined nodebug} %{__rm} -f %{_builddir}/debugfiles.list %{_builddir}/debuglinks.list \ %{_builddir}/debugsourcefiles.list %{_builddir}/debugsources.list \ %{_builddir}/elfbins.list %endif ### SCRIPTLET ############################################################################### %verifyscript # fix changelog for openSUSE buildservice %changelog * Fri May 10 2024 12:37:48 +0000 Manvendra Bhangui 1.0.0-1.1%{?dist} Release 1.0.0-1.1 Start 02/06/2020 End 08/09/2022 - New package indimail-utils - QA Fixes for documentation, RPM Lint fixes - Add AC_PROG_CC_C99 to configure - mpack - fixed possible buffer overflow in uudecode.c - Fixed compiler warnings on Darwin - exec.c: replaced sys_siglist with strsignal() - added debuginfo package - added github-obs integration - PKGBUILD: Fix permissions for directories - changed permissions for dirs with 555 to 755