From 8ff4e9ab2308fc6ee1e9b140d85ba45eff5287ce Mon Sep 17 00:00:00 2001 From: Sam hartman Date: Mon, 10 Oct 2011 15:25:11 +0100 Subject: [PATCH] Initial RPM packaging --- lib/Makefile.am | 19 +++++++++++++ lib/configure.ac | 6 ++-- lib/libradsec.spec.in | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 3 deletions(-) create mode 100644 lib/libradsec.spec.in diff --git a/lib/Makefile.am b/lib/Makefile.am index a26750d..9d8249c 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2,6 +2,7 @@ AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I m4 SUBDIRS = . examples include +DIST_SUBDIRS=tests ${SUBDIRS} INCLUDES = -I$(srcdir)/include AM_CFLAGS = -Wall -g @@ -35,5 +36,23 @@ libradsec_la_SOURCES += \ rsp_tlscommon.c endif +libradsec_la_SOURCES += compat.h \ + conn.h \ + debug.h \ + err.h \ + event.h \ + packet.h \ + peer.h \ + rsp_debug.h\ + rsp_hash.h \ + rsp_list.h \ + rsp_tlscommon.h \ + rsp_util.h \ + tcp.h \ + tls.h \ + udp.h + libradsec_la_LDFLAGS = -version-info 0:0:0 -export-symbols radsec.sym libradsec_la_CFLAGS = $(AM_CFLAGS) -Werror # -DDEBUG -DDEBUG_LEVENT + +EXTRA_DIST = libradsec.spec radsec.sym diff --git a/lib/configure.ac b/lib/configure.ac index 90e2583..0df726d 100644 --- a/lib/configure.ac +++ b/lib/configure.ac @@ -1,7 +1,7 @@ # -*- Autoconf -*- script for libradsec. -AC_PREREQ([2.65]) -AC_INIT([libradsec], [0.0.2-dev], [linus+libradsec@nordu.net]) +AC_PREREQ([2.63]) +AC_INIT([libradsec], [0.0.2.dev], [linus+libradsec@nordu.net]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([radsec.c]) AC_CONFIG_AUX_DIR([build-aux]) @@ -42,7 +42,7 @@ AC_TYPE_UINT8_T # Checks for library functions. AC_CHECK_FUNCS([memset socket strdup strerror strrchr]) -AC_CONFIG_FILES([Makefile +AC_CONFIG_FILES([Makefile libradsec.spec include/Makefile examples/Makefile tests/Makefile]) diff --git a/lib/libradsec.spec.in b/lib/libradsec.spec.in new file mode 100644 index 0000000..6572814 --- /dev/null +++ b/lib/libradsec.spec.in @@ -0,0 +1,78 @@ +Name: @PACKAGE@ +Version: @PACKAGE_VERSION@ +Release: 1%{?dist} +Summary: RADIUS over TLS library + +Group: System Environment/Libraries +License: BSD +URL: http://software.uninett.no/radsecproxy/?page=documentation +Source0: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + + + +BuildRequires: openssl-devel +BuildRequires: libconfuse-devel +BuildRequires: freeradius-devel +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: libevent-devel >= 2.0 + + + +%description + Libradsec is a RADIUS over TLS library. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%prep +%setup -q + + +%build + export CPPFLAGS='-I%{_includedir}' + export LDFLAGS='-L%{_libdir} -L/usr/%{_lib}/freeradius' +%configure --disable-static +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + +%files +%defattr(-,root,root,-) +%doc README +%{_libdir}/*.so.* + +%files devel +%defattr(-,root,root,-) +%{_includedir}/* +%{_libdir}/*.so + + +%changelog +* Tue Sep 27 2011 - %{version}-1 +- initial version + -- 2.1.4