commit 80c7d975d48ba272a987261a1bc8aa90bb3239cf Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 10:55:49 2019 -0400 Package init diff --git a/autoconf.h b/autoconf.h new file mode 100644 index 0000000..aa5de1c --- /dev/null +++ b/autoconf.h @@ -0,0 +1,51 @@ +/* + * This autoconf.h is a wrapper include file for the original libecap/common/autoconf.h, + * which has been renamed to autoconf-.h. There are conflicts for the + * original autoconf.h on multilib systems, which result from arch-specific + * configuration options. Please do not use the arch-specific file directly. + */ + +/* + * This wrapped is addpated from SDL's one: + * http://pkgs.fedoraproject.org/cgit/SDL.git/tree/SDL_config.h + */ + +#ifdef libecap_autoconf_wrapper_h +#error "libecap_autoconf_wrapper_h should not be defined!" +#endif +#define libecap_autoconf_wrapper_h + +#if defined(__i386__) +#include "libecap/common/autoconf-i386.h" +#elif defined(__ia64__) +#include "libecap/common/autoconf-ia64.h" +#elif defined(__powerpc64__) +#include +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#include "libecap/common/autoconf-ppc64.h" +#else +#include "libecap/common/autoconf-ppc64le.h" +#endif +#elif defined(__powerpc__) +#include "libecap/common/autoconf-ppc.h" +#elif defined(__s390x__) +#include "libecap/common/autoconf-s390x.h" +#elif defined(__s390__) +#include "libecap/common/autoconf-s390.h" +#elif defined(__x86_64__) +#include "libecap/common/autoconf-x86_64.h" +#elif defined(__arm__) +#include "libecap/common/autoconf-arm.h" +#elif defined(__alpha__) +#include "libecap/common/autoconf-alpha.h" +#elif defined(__sparc__) && defined (__arch64__) +#include "libecap/common/autoconf-sparc64.h" +#elif defined(__sparc__) +#include "libecap/common/autoconf-sparc.h" +#elif defined(__aarch64__) +#include "libecap/common/autoconf-aarch64.h" +#else +#error "The libecap-devel package is not usable with the architecture." +#endif + +#undef libecap_autoconf_wrapper_h diff --git a/libecap-1.0.1.tar.gz b/libecap-1.0.1.tar.gz new file mode 100644 index 0000000..14bb21a Binary files /dev/null and b/libecap-1.0.1.tar.gz differ diff --git a/libecap.spec b/libecap.spec new file mode 100644 index 0000000..c62addf --- /dev/null +++ b/libecap.spec @@ -0,0 +1,67 @@ +Name: libecap +Version: 1.0.1 +Release: 4 +Summary: an loadable eCAP adapter for Squid HTTP-Proxy +License: BSD +URL: http://www.e-cap.org/ +Source0: http://www.e-cap.org/archive/%{name}-%{version}.tar.gz + +Source1: autoconf.h +BuildRequires: git gcc gcc-c++ + +%description +eCAP is a software interface that allows a network application, +such as an HTTP proxy or an ICAP server, to outsource content +analysis and adaptation to a loadable module. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +%description devel +Development files for %{name} + +%package help +Summary: Help files for %{name} +BuildArch: noarch +%description help +Help files for %{name} + +%prep +%autosetup -n %{name}-%{version} -p1 -Sgit + +%build +%configure +%make_build + +%install +%make_install +pushd %{buildroot}%{_includedir}/%{name}/common +mv autoconf.h autoconf-%{_arch}.h +install -m0644 %{SOURCE1} . +popd +%delete_la_and_a + +%check +make check + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%doc CREDITS LICENSE NOTICE +%{_libdir}/%{name}.so.* + +%files devel +%defattr(-,root,root) +%{_libdir}/%{name}.so +%{_includedir}/%{name}* +%{_libdir}/pkgconfig/%{name}.pc + +%files help +%defattr(-,root,root) +%doc README + +%changelog +* Wed Aug 28 2019 openEuler Buildteam - 1.0.1-4 +- Package init