# # # $Id: indimail-mta.spec.in,v 1.247 2020-08-03 17:30:46+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 reconfigure_mode 0 %else %define _project local %global build_on_obs 0 %global reconfigure_mode 0 %global _hardened_build 1 %endif %if %{defined nodebug} %global debug_package %{nil} %endif %global _prefix /usr %global mandir /usr/share/man %global _pkg_config_path /usr/%{_lib}/pkgconfig %global _verbose 0 %if %build_on_obs == 1 %global packager Manvendra Bhangui > %endif %if 0%{?suse_version} %global dist suse %global disttag suse %endif %if 0%{?fedora_version} %global dist %{?dist} %global disttag fedora %endif Summary: Sender Rewriting Scheme library Name: libsrs2 Version: 1.0.18 Release: 1.1%{?dist} %if %build_on_obs == 1 License: GPL-2.0-only %else License: GPLv2 %endif %if %{undefined suse_version} && %{undefined sles_version} Group: System Environment/Libraries %else Group: System/Libraries %endif Source0: http://downloads.sourceforge.net/indimail/libsrs2-%{version}.tar.gz Source1: http://downloads.sourceforge.net/indimail/libsrs2-rpmlintrc URL: https://github.com/indimail/indimail-mta BuildRequires: gcc gcc-c++ make autoconf automake libtool pkgconfig BuildRequires: findutils diffutils gzip coreutils BuildRequires: glibc glibc-devel binutils ##################################### OBS #################################### %if %build_on_obs == 1 %if 0%{?suse_version} BuildRequires: -post-build-checks #!BuildIgnore: post-build-checks %endif %endif ############################################################################## AutoReqProv: Yes Provides: srs2-libs = %{version} Provides: srs2-libs%{?_isa} = %{version} Requires: coreutils glibc findutils pkgconfig %description libsrs2 is the next generation SRS library. SPF verifies that the Sender address of a mail matches (according to some policy) the client IP address which submits the mail. When a mail is forwarded, the sender address must be rewritten to comply with SPF policy. The Sender Rewriting Scheme, or SRS, provides a standard for this rewriting which is not vulnerable to attacks by spammers. %package -n libsrs2-devel Summary: Development header files and libraries for libsrs2 %if %{undefined suse_version} && %{undefined sles_version} Group: System Environment/Libraries %else Group: Development/Tools/Other %endif Requires: libsrs2 = %{version} %description -n libsrs2-devel This package contains the development header files and libraries necessary to applications that incorporates sender rewriting scheme, a part of the SPF/SRS protocol pair. %prep %setup -q %build %configure --prefix=%{_prefix} --mandir=%{mandir} %install %if 0%{?build_cflags:1} CFLAGS="%{build_cflags}" %else CFLAGS="%{optflags}" %endif %if 0%{?build_ldflags:1} LDFLAGS="%{build_ldflags} -pie" %endif %if %{undefined centos_version} && %{undefined rhel_version} CFLAGS="$CFLAGS -ffat-lto-objects" %else %if %{defined centos_version} && 0%{?centos_version} > 700 CFLAGS="$CFLAGS -ffat-lto-objects" %endif %if %{defined rhel_version} && 0%{?rhel_version} > 700 CFLAGS="$CFLAGS -ffat-lto-objects" %endif %endif %{__make} -s %{?_smp_mflags} CC="%{__cc}" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" %if %{defined nodebug} %{__make} -s %{?_smp_mflags} DESTDIR=%{buildroot} install-strip %else %{__make} -s %{?_smp_mflags} DESTDIR=%{buildroot} install %endif for i in %{name} %{name}-devel do %{__mkdir_p} %{buildroot}%{_prefix}/share/doc/$i install -p -m 0644 COPYING %{buildroot}%{_prefix}/share/doc/$i install -p -m 0644 LICENSE.BSD %{buildroot}%{_prefix}/share/doc/$i install -p -m 0644 LICENSE.GPL-2 %{buildroot}%{_prefix}/share/doc/$i install -p -m 0644 AUTHORS %{buildroot}%{_prefix}/share/doc/$i install -p -m 0644 doc/ChangeLog %{buildroot}%{_prefix}/share/doc/$i done %{__rm} -f %{buildroot}%{_libdir}/libsrs2.la %files %defattr(-, root, root,-) %{_libdir}/libsrs2.so.1 %{_libdir}/libsrs2.so.1.0.0 %doc %attr(644,root,root) %{mandir}/man1/* %attr(755,root,root) %{_prefix}/bin/srs %if %build_on_obs == 0 %license %attr(0644,root,root) %{_prefix}/share/doc/%{name}/COPYING %license %attr(0644,root,root) %{_prefix}/share/doc/%{name}/LICENSE.BSD %license %attr(0644,root,root) %{_prefix}/share/doc/%{name}/LICENSE.GPL-2 %else %attr(0644,root,root) %{_prefix}/share/doc/%{name}/COPYING %attr(0644,root,root) %{_prefix}/share/doc/%{name}/LICENSE.BSD %attr(0644,root,root) %{_prefix}/share/doc/%{name}/LICENSE.GPL-2 %endif %attr(0644,root,root) %{_prefix}/share/doc/%{name}/AUTHORS %attr(0644,root,root) %{_prefix}/share/doc/%{name}/ChangeLog %files devel %dir %attr(755,root,root) %{_prefix}/include/srs2 %attr(644,root,root) %{_prefix}/include/srs2/srs2.h %{_libdir}/libsrs2.so %{_libdir}/libsrs2.a %{_pkg_config_path}/libsrs2.pc %if %build_on_obs == 0 %license %attr(0644,root,root) %{_prefix}/share/doc/%{name}-devel/COPYING %license %attr(0644,root,root) %{_prefix}/share/doc/%{name}-devel/LICENSE.BSD %license %attr(0644,root,root) %{_prefix}/share/doc/%{name}-devel/LICENSE.GPL-2 %else %attr(0644,root,root) %{_prefix}/share/doc/%{name}-devel/COPYING %attr(0644,root,root) %{_prefix}/share/doc/%{name}-devel/LICENSE.BSD %attr(0644,root,root) %{_prefix}/share/doc/%{name}-devel/LICENSE.GPL-2 %endif %attr(0644,root,root) %{_prefix}/share/doc/%{name}-devel/AUTHORS %attr(0644,root,root) %{_prefix}/share/doc/%{name}-devel/ChangeLog %post argv1=$1 if [ -z "$argv1" ] ; then argv1=0 fi if [ "$argv1" -eq 2 ] ; then # upgrade # we are doing upgrade if [ "%{_libdir}" != "/usr/lib64" -a "%{_libdir}" != "/usr/lib" ] ; then /sbin/ldconfig fi fi %postun if [ "%{_libdir}" != "/usr/lib64" -a "%{_libdir}" != "/usr/lib" ] ; then /sbin/ldconfig fi %changelog * Sun Jun 16 2024 10:15:51 +0000 Manvendra Bhangui 1.0.18-1.1%{?dist} Release 1.0.18-1.1 Start 05/06/2004 End 08/09/2022 - First Release - FreeBSD, Darwin Port - added debuginfo package - updated configure.ac - updated srs man page