diff options
| author | Paweł Krawczyk <pawel.krawczyk@hush.com> | 2014-09-18 10:46:34 +0100 |
|---|---|---|
| committer | Paweł Krawczyk <pawel.krawczyk@hush.com> | 2014-09-18 10:46:34 +0100 |
| commit | 38f29a2294e0a1e2c3f1096467537020d5d0931e (patch) | |
| tree | 348ff1800674d15dc70ece13637d3b1a2550ffba | |
| parent | 1ccfc6726e058d351035c07bc45ba65d2c20af8f (diff) | |
| parent | e96c8e9206bbccc89d2d2e71f01b7ba15febbc94 (diff) | |
| download | pam_tacplus-38f29a2294e0a1e2c3f1096467537020d5d0931e.tar.gz pam_tacplus-38f29a2294e0a1e2c3f1096467537020d5d0931e.zip | |
Merge pull request #13 from gollub/shared_libtac
[RFC] Build and install libtac as shared library
| -rw-r--r-- | Makefile.am | 38 | ||||
| -rw-r--r-- | configure.ac | 9 | ||||
| -rw-r--r-- | debian/control | 16 | ||||
| -rw-r--r-- | debian/dirs | 1 | ||||
| -rw-r--r-- | debian/libpam-tacplus.install | 2 | ||||
| -rw-r--r-- | debian/libtac-dev.install | 3 | ||||
| -rw-r--r-- | debian/libtac0.install | 1 | ||||
| -rwxr-xr-x | debian/rules | 2 | ||||
| -rw-r--r-- | libtac.pc.in | 11 |
9 files changed, 65 insertions, 18 deletions
diff --git a/Makefile.am b/Makefile.am index 0563f30..dd73b01 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,12 +9,14 @@ ACLOCAL_AMFLAGS = -I config AUTOMAKE_OPTIONS = subdir-objects -moduledir = @libdir@ -module_LTLIBRARIES = pam_tacplus.la -pam_tacplus_la_SOURCES = pam_tacplus.h \ -pam_tacplus.c \ -support.h \ -support.c \ +libtac_includedir = $(includedir)/libtac +libtac_include_HEADERS = \ +libtac/include/tacplus.h \ +libtac/include/libtac.h \ +libtac/include/cdefs.h + +lib_LTLIBRARIES = libtac.la +libtac_la_SOURCES = \ libtac/lib/acct_r.c \ libtac/lib/acct_s.c \ libtac/lib/attrib.c \ @@ -37,26 +39,32 @@ libtac/lib/read_wait.c \ libtac/lib/version.c \ libtac/lib/xalloc.c \ libtac/lib/xalloc.h \ -libtac/include/tacplus.h \ -libtac/include/libtac.h \ -libtac/include/cdefs.h +$(libtac_include_HEADERS) +libtac_la_CFLAGS = $(AM_CFLAGS) -Ilibtac/include +libtac_la_LDFLAGS = -version-info 0:0:0 -shared +moduledir = @pamdir@ +module_LTLIBRARIES = pam_tacplus.la +pam_tacplus_la_SOURCES = pam_tacplus.h \ +pam_tacplus.c \ +support.h \ +support.c pam_tacplus_la_CFLAGS = $(AM_CFLAGS) -Ilibtac/include pam_tacplus_la_LDFLAGS = -module -avoid-version +pam_tacplus_la_LIBADD = libtac.la -EXTRA_DIST = pam_tacplus.spec sample.pam +EXTRA_DIST = pam_tacplus.spec sample.pam libtac.pc.in MAINTAINERCLEANFILES = Makefile.in config.h.in configure aclocal.m4 \ config/config.guess config/config.sub config/depcomp \ config/install-sh config/ltmain.sh config/missing +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libtac.pc install-data-hook: - -rm $(DESTDIR)$(libdir)/pam_tacplus.la - -rm $(DESTDIR)$(libdir)/pam_tacplus.a - -rm $(DESTDIR)$(libdir)/pam_tacplus.so - ${INSTALL} -d $(DESTDIR)$(libdir)/security - ${INSTALL} -m 755 .libs/pam_tacplus.so $(DESTDIR)$(libdir)/security + rm -f $(DESTDIR)$(pamdir)/pam_tacplus.la + rm -f $(DESTDIR)$(pamdir)/pam_tacplus.a ${INSTALL} -d $(DESTDIR)$(docdir) ${INSTALL} -m 644 sample.pam $(DESTDIR)$(docdir) diff --git a/configure.ac b/configure.ac index c6c5b02..11e7af1 100644 --- a/configure.ac +++ b/configure.ac @@ -59,7 +59,16 @@ AC_TYPE_SIGNAL AC_CHECK_FUNCS([bzero gethostbyname gettimeofday inet_ntoa select socket]) dnl -------------------------------------------------------------------- +dnl Switch for pam module dir +AC_ARG_ENABLE([pamdir], [AS_HELP_STRING([--enable-pamdir], + [Location to install the pam module ($libdir/security)])], + [pamdir=$enableval], [pamdir=$libdir/security]) +AC_SUBST(pamdir) + + +dnl -------------------------------------------------------------------- dnl Generate made files AC_CONFIG_FILES([Makefile + libtac.pc pam_tacplus.spec]) AC_OUTPUT diff --git a/debian/control b/debian/control index de703ef..4709f74 100644 --- a/debian/control +++ b/debian/control @@ -8,9 +8,23 @@ Homepage: https://github.com/jeroennijhof/pam_tacplus Package: libpam-tacplus Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libpam-runtime +Depends: ${shlibs:Depends}, ${misc:Depends}, libpam-runtime, libtac0 Description: PAM module for using TACACS+ as an authentication service This PAM module support authentication, authorization (account management) and accounting (session management) performed using TACACS+ protocol designed by Cisco. +Package: libtac0 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: TACACS+ protocol library + This library implemenents the fundamentls of the TACACS+ protocol and supports + authentication, authorization (account management) and accounting (session management). + +Package: libtac-dev +Section: libdevel +Architecture: any +Depends: ${misc:Depends}, libtac0 (= ${binary:Version}), libc6-dev|libc-dev +Description: Development files for TACACS+ protocol library + Contains C header files and development files for libtac, a TACACS+ protocol + implementation. diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index d1f6515..0000000 --- a/debian/dirs +++ /dev/null @@ -1 +0,0 @@ -lib/security diff --git a/debian/libpam-tacplus.install b/debian/libpam-tacplus.install new file mode 100644 index 0000000..49a31e8 --- /dev/null +++ b/debian/libpam-tacplus.install @@ -0,0 +1,2 @@ +lib/*/security/*.so +usr/share/doc/libpam-tacplus/sample.pam diff --git a/debian/libtac-dev.install b/debian/libtac-dev.install new file mode 100644 index 0000000..8bad7da --- /dev/null +++ b/debian/libtac-dev.install @@ -0,0 +1,3 @@ +usr/lib/*/*.so +usr/lib/*/pkgconfig/libtac.pc +usr/include/ diff --git a/debian/libtac0.install b/debian/libtac0.install new file mode 100644 index 0000000..3de3b10 --- /dev/null +++ b/debian/libtac0.install @@ -0,0 +1 @@ +usr/lib/*/*.so.* diff --git a/debian/rules b/debian/rules index f9c6fc8..0fa1f54 100755 --- a/debian/rules +++ b/debian/rules @@ -17,7 +17,7 @@ override_dh_clean: dh_clean override_dh_auto_configure: - dh_auto_configure -- --libdir=/lib --docdir=/usr/share/doc/libpam-tacplus + dh_auto_configure -- --enable-pamdir=/lib/$(DEB_HOST_MULTIARCH)/security --docdir=/usr/share/doc/libpam-tacplus override_dh_install: mkdir -p debian/libpam-tacplus/usr/share/pam-configs diff --git a/libtac.pc.in b/libtac.pc.in new file mode 100644 index 0000000..6d8bdde --- /dev/null +++ b/libtac.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/libtac + +Name: libtac +Description: A TACACS+ protocol implementation +URL: https://github.com/jeroennijhof/pam_tacplus +Version: @VERSION@ +Libs: -L${libdir} -ltac +Cflags: -I${includedir} |
