From da00770799d03803d9961189285bd15d5c7c5c89 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 27 Apr 2025 02:21:20 +0000 Subject: Add pkg-config support Signed-off-by: Laurent Bercot --- .gitignore | 1 + INSTALL | 29 +++++++++++- Makefile | 79 ++++++++++++++++++++++++------- NEWS | 3 +- configure | 131 +++++++++++++++++++++++++++++++++++++--------------- doc/index.html | 4 +- doc/upgrade.html | 6 +-- package/deps-build | 2 +- package/deps.mak | 38 +++++++-------- package/info | 2 +- package/targets.mak | 2 + tools/gen-deps.sh | 17 ++++--- tools/gen-dotpc.sh | 101 ++++++++++++++++++++++++++++++++++++++++ 13 files changed, 328 insertions(+), 87 deletions(-) create mode 100755 tools/gen-dotpc.sh diff --git a/.gitignore b/.gitignore index 4fb2d9b..5926be4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.o *.lo +/*.pc /config.mak /src/include/nsss/config.h /libnsss.a.xyzzy diff --git a/INSTALL b/INSTALL index 363b5e0..b5c8ab6 100644 --- a/INSTALL +++ b/INSTALL @@ -8,7 +8,7 @@ Build Instructions - GNU make version 3.81 or later - skalibs version 2.14.4.0 or later: https://skarnet.org/software/skalibs/ - To run the test suite and the nsssd-* programs: - s6 version 2.13.1.1 or later: https://skarnet.org/software/s6/ + s6 version 2.13.2.0 or later: https://skarnet.org/software/s6/ This software will run on any operating system that implements POSIX.1-2008, available at: @@ -29,6 +29,33 @@ POSIX.1-2008, available at: off them. +* pkg-config + ---------- + + pkg-config is a tool used by some Linux and BSD distributions, providing +a registry to store policy information about libraries exported by a +software package; that is supposed to make it easier to build software +depending on these libraries, by having a tool to automatically extract +the various flags to pass to the compiler and linker in order to correctly +build against these libraries. + This package supports pkg-config, but you need to explicitly ask for it: + - To use the pkg-config tool to *read* information from the registry and +use it to build *this* package: --with-pkgconfig[=PROG]. This assumes +PROG supports the pkg-config interface (as the popular pkgconf +implementation does). If PROG is not supplied, the PKG_CONFIG environment +variable is used to find the program to use, and if empty/unset, it defaults +to pkg-config. + - To build a .pc file for each library exported by this package, and then +install it to the pkg-config registry, in other words to *write* information +so that other software can use pkg-config to build against this package, +use --enable-pkgconfig. + + pkg-config and slashpackage (see below) configure options can be set +together, but the slashpackage convention provides its own installation +policies that generally make it unnecessary to use pkg-config. You +probably should not mix both. + + * Customization ------------- diff --git a/Makefile b/Makefile index b82361b..752b8ba 100644 --- a/Makefile +++ b/Makefile @@ -12,28 +12,65 @@ ifeq "" "$(strip $(filter $(make_need), $(firstword $(sort $(make_need) $(MAKE_V fail := $(error Your make ($(MAKE_VERSION)) is too old. You need $(make_need) or newer) endif +uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))) + CC = $(error Please use ./configure first) STATIC_LIBS := SHARED_LIBS := INTERNAL_LIBS := EXTRA_TARGETS := +PC_TARGETS := LIB_DEFS := +BIN_SYMLINKS := +TEST_BINS := define library_definition -LIB$(firstword $(subst =, ,$(1))) := lib$(lastword $(subst =, ,$(1))).$(if $(DO_ALLSTATIC),a,so).xyzzy +LIB$(1) := lib$(2).$(if $(DO_ALLSTATIC),a,so).xyzzy ifdef DO_SHARED -SHARED_LIBS += lib$(lastword $(subst =, ,$(1))).so.xyzzy +SHARED_LIBS += lib$(2).so.xyzzy endif ifdef DO_STATIC -STATIC_LIBS += lib$(lastword $(subst =, ,$(1))).a.xyzzy +STATIC_LIBS += lib$(2).a.xyzzy +endif +ifdef DO_PKGCONFIG +PC_TARGETS += lib$(2).pc endif + +lib$(2).pc: + exec env \ + library="$(2)" \ + includedir="$(includedir)" \ + dynlibdir="$(dynlibdir)" \ + libdir="$(libdir)" \ + extra_includedirs="$(extra_includedirs)" \ + extra_libdirs="$(extra_libdirs)" \ + extra_libs="$$(strip $$(EXTRA_LIBS))" \ + description="$$($(1)_DESCRIPTION)" \ + url="$$($(1)_URL)" \ + ldlibs="$(LDLIBS)" \ + ./tools/gen-dotpc.sh > $$@.tmp + exec mv -f $$@.tmp $$@ + +endef + +define binary_installation_rule +$(DESTDIR)$(1)/$(2): ./$(2) package/modes + exec $(INSTALL) -D -m 600 $$< $$@ + grep -- ^$$(@F) < package/modes | { read name mode owner && \ + if [ x$$$$owner != x ] ; then chown -- $$$$owner $$@ ; fi && \ + chmod $$$$mode $$@ ; } +endef + +define symlink_installation_rule +$(DESTDIR)$(1)/$(2): $(DESTDIR)$(1)/$(SYMLINK_TARGET_$(2)) + exec $(INSTALL) -l $$(|/dev/null > "$tmpc" && break - 2>|/dev/null > "$tmpo" && break - 2>|/dev/null > "$tmpe" && break - test "$i" -gt 50 && fail "$0: cannot create temporary files" -done -set +C -trap 'rm -f "$tmpc" "$tmpo" "$tmpe"' EXIT ABRT INT QUIT TERM HUP +# Process deps-build +if test -n "$pkgconf" || $pcw || $slashpackage ; then + oldifs="$IFS" + while IFS=" " read cond usedinlibs pkg ver libs ; do + IFS="$oldifs" + eval "cond=$cond; usedinlibs=$usedinlibs" + if $cond ; then + if test -n "$pkgconf" ; then + for lib in $libs ; do + if ! $pkgconf --atleast-version=${ver} --print-errors -- "$lib" ; then + echo "./configure: fatal: $pkgconf --atleast-version=${ver} --print-errors -- $lib failed" 1>&2 + exit 1 + fi + thisinc="`$pkgconf --cflags-only-I -- $lib`" + sldflags="`$pkgconf --libs-only-L --static -- $lib`" + dldflags="`$pkgconf --libs-only-L -- $lib`" + addincpath="${addincpath}${thisinc:+ }$thisinc" + addlibspath="${addlibspath}${sldflags:+ }$sldflags" + addlibdpath="${addlibdpath}${dldflags:+ }$dldflags" + for i in $sldflags ; do + vpaths="$vpaths ${i##-L}" + done + for i in $dldflags ; do + vpathd="$vpathd ${i##-L}" + done + if $usedinlibs ; then + depincpath="${depincpath}${thisinc:+ }$thisinc" + deplibpath="${deplibpath}${sldflags:+ }$sldflags" + fi + done + fi + if $slashpackage ; then + addincpath="$addincpath -I${DESTDIR}${sproot}${pkg}/include" + vpaths="$vpaths ${DESTDIR}${sproot}${pkg}/library" + addlibspath="$addlibspath -L${DESTDIR}${sproot}${pkg}/library" + vpathd="$vpathd ${DESTDIR}${sproot}${pkg}/library.so" + addlibdpath="$addlibdpath -L${DESTDIR}${sproot}${pkg}/library.so" + if $usedinlibs ; then + depincpath="$depincpath -I${DESTDIR}${sproot}${pkg}/include" + deplibpath="$deplibpath -L${DESTDIR}${sproot}${pkg}/library" + fi + fi + fi + done < package/deps-build + IFS="$oldifs" +fi -# Set slashpackage values +# Other slashpackage values if $slashpackage ; then home=${sproot}/package/${category}/${package}-${version} exthome=${sproot}/package/${category}/${package} @@ -256,22 +303,25 @@ if $slashpackage ; then libdir=${home}/library libexecdir=$bindir includedir=${home}/include - while read dep condvar ; do - if test -n "$condvar" ; then - eval "cond=$condvar" - else - cond=true - fi - if $cond ; then - addincpath="$addincpath -I${DESTDIR}${sproot}${dep}/include" - vpaths="$vpaths ${DESTDIR}${sproot}${dep}/library" - addlibspath="$addlibspath -L${DESTDIR}${sproot}${dep}/library" - vpathd="$vpathd ${DESTDIR}${sproot}${dep}/library.so" - addlibdpath="$addlibdpath -L${DESTDIR}${sproot}${dep}/library.so" - fi - done < package/deps-build + pkgconfdir=${home}/pkgconfig fi +# Get usable temp filenames +i=0 +set -C +while : ; do + i=$(($i+1)) + tmpc="./tmp-configure-$$-$PPID-$i.c" + tmpo="./tmp-configure-$$-$PPID-$i.o" + tmpe="./tmp-configure-$$-$PPID-$i.tmp" + 2>|/dev/null > "$tmpc" && break + 2>|/dev/null > "$tmpo" && break + 2>|/dev/null > "$tmpe" && break + test "$i" -gt 50 && fail "$0: cannot create temporary files" +done +set +C +trap 'rm -f "$tmpc" "$tmpo" "$tmpe"' EXIT ABRT INT QUIT TERM HUP + # Find a C compiler to use if test -n "$target" && test x${build} != x${target} ; then cross=${target}- @@ -389,12 +439,15 @@ libexecdir := $libexecdir bindir := $bindir libdir := $libdir includedir := $includedir +pkgconfdir := $pkgconfdir sysdeps := $sysdeps slashpackage := $slashpackage sproot := $sproot version := $version home := $home exthome := $exthome +extra_includedirs :=$depincpath +extra_libdirs :=$deplibpath SPAWN_LIB := ${spawn_lib} SOCKET_LIB := ${socket_lib} SYSCLOCK_LIB := ${sysclock_lib} @@ -403,17 +456,18 @@ UTIL_LIB := ${util_lib} CC := $CC_AUTO CPPFLAGS_AUTO := $CPPFLAGS_AUTO -CPPFLAGS := $CPPFLAGS $CPPFLAGS_POST +CPPFLAGS := ${CPPFLAGS}${CPPFLAGS_POST:+ }$CPPFLAGS_POST CFLAGS_AUTO := $CFLAGS_AUTO -CFLAGS := $CFLAGS $CFLAGS_POST +CFLAGS := ${CFLAGS}${CFLAGS_POST:+ }$CFLAGS_POST LDFLAGS_AUTO := $LDFLAGS_AUTO -LDFLAGS := $LDFLAGS $LDFLAGS_POST +LDFLAGS := ${LDFLAGS}${LDFLAGS_POST:+ }$LDFLAGS_POST LDFLAGS_SHARED := $LDFLAGS_SHARED LDFLAGS_NOSHARED := $LDFLAGS_NOSHARED CROSS_COMPILE := $cross vpath lib%.a$vpaths vpath lib%.so$vpathd + EOF if $allstatic ; then echo ".LIBPATTERNS := lib%.a" @@ -431,6 +485,11 @@ if $shared ; then else echo "DO_SHARED :=" fi +if $pcw ; then + echo "DO_PKGCONFIG := 1" +else + echo "DO_PKGCONFIG :=" +fi if $allpic ; then echo "STATIC_LIBS_ARE_PIC := 1" else diff --git a/doc/index.html b/doc/index.html index a79ece0..cce2f7c 100644 --- a/doc/index.html +++ b/doc/index.html @@ -85,7 +85,7 @@ functions. requirement if you link against the shared version of the skalibs library.
  • s6 version -2.13.1.1 or later. It's a run-time requirement only, to run +2.13.2.0 or later. It's a run-time requirement only, to run the nsssd service (and can be done without if you have a suitable replacement for s6-ipcserver).
  • @@ -100,7 +100,7 @@ for s6-ipcserver). Download
      -
    • The current released version of nsss is 0.2.0.6.
    • +
    • The current released version of nsss is 0.2.1.0.
    • Alternatively, you can checkout a copy of the nsss git repository: diff --git a/doc/upgrade.html b/doc/upgrade.html index bdb72f6..fca02aa 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -18,14 +18,14 @@

      What has changed in nsss

      -

      In 0.2.0.6

      +

      In 0.2.1.0

      • skalibs dependency bumped to 2.14.4.0.
      • s6 run-time -dependency bumped to 2.13.1.1.
      • -
      • Static libraries now install in /usr/lib by default.
      • +dependency bumped to 2.13.2.0. +
      • pkg-config is now supported, see ./configure --help.

      In 0.2.0.5

      diff --git a/package/deps-build b/package/deps-build index 05d5af4..1a04c17 100644 --- a/package/deps-build +++ b/package/deps-build @@ -1 +1 @@ -/package/prog/skalibs +true true /package/prog/skalibs 2.14.4.0 libskarnet diff --git a/package/deps.mak b/package/deps.mak index ec98fd2..6ef4e7b 100644 --- a/package/deps.mak +++ b/package/deps.mak @@ -162,29 +162,31 @@ src/tests/test-unix.o src/tests/test-unix.lo: src/tests/test-unix.c src/include/ ifeq ($(strip $(STATIC_LIBS_ARE_PIC)),) libnsss.a.xyzzy: src/libnsss/nsss_all_endgrent.o src/libnsss/nsss_all_endpwent.o src/libnsss/nsss_all_endspent.o src/libnsss/nsss_all_errno.o src/libnsss/nsss_all_getgrent.o src/libnsss/nsss_all_getgrent_r.o src/libnsss/nsss_all_getgrgid.o src/libnsss/nsss_all_getgrgid_r.o src/libnsss/nsss_all_getgrnam.o src/libnsss/nsss_all_getgrnam_r.o src/libnsss/nsss_all_getgrouplist.o src/libnsss/nsss_all_getpwent.o src/libnsss/nsss_all_getpwent_r.o src/libnsss/nsss_all_getpwnam.o src/libnsss/nsss_all_getpwnam_r.o src/libnsss/nsss_all_getpwuid.o src/libnsss/nsss_all_getpwuid_r.o src/libnsss/nsss_all_getspent.o src/libnsss/nsss_all_getspent_r.o src/libnsss/nsss_all_getspnam.o src/libnsss/nsss_all_getspnam_r.o src/libnsss/nsss_all_setgrent.o src/libnsss/nsss_all_setpwent.o src/libnsss/nsss_all_setspent.o src/libnsss/nsss_grp_copy.o src/libnsss/nsss_grp_here.o src/libnsss/nsss_grouplist_adjust.o src/libnsss/nsss_pwd_copy.o src/libnsss/nsss_pwd_here.o src/libnsss/nsss_shadow_copy.o src/libnsss/nsss_shadow_here.o src/libnsss/nsss_switch_end.o src/libnsss/nsss_switch_endgrent.o src/libnsss/nsss_switch_endpwent.o src/libnsss/nsss_switch_endspent.o src/libnsss/nsss_switch_enumerator.o src/libnsss/nsss_switch_getgrent.o src/libnsss/nsss_switch_getgrent_r.o src/libnsss/nsss_switch_getgrgid.o src/libnsss/nsss_switch_getgrgid_r.o src/libnsss/nsss_switch_getgrnam.o src/libnsss/nsss_switch_getgrnam_r.o src/libnsss/nsss_switch_getgrouplist.o src/libnsss/nsss_switch_getpwent.o src/libnsss/nsss_switch_getpwent_r.o src/libnsss/nsss_switch_getpwnam.o src/libnsss/nsss_switch_getpwnam_r.o src/libnsss/nsss_switch_getpwuid.o src/libnsss/nsss_switch_getpwuid_r.o src/libnsss/nsss_switch_getspent.o src/libnsss/nsss_switch_getspent_r.o src/libnsss/nsss_switch_getspnam.o src/libnsss/nsss_switch_getspnam_r.o src/libnsss/nsss_switch_grp_end.o src/libnsss/nsss_switch_grp_get.o src/libnsss/nsss_switch_grp_getbygid.o src/libnsss/nsss_switch_grp_getbyname.o src/libnsss/nsss_switch_grp_getlist.o src/libnsss/nsss_switch_grp_read.o src/libnsss/nsss_switch_grp_rewind.o src/libnsss/nsss_switch_op.o src/libnsss/nsss_switch_pwd_end.o src/libnsss/nsss_switch_pwd_get.o src/libnsss/nsss_switch_pwd_getbyname.o src/libnsss/nsss_switch_pwd_getbyuid.o src/libnsss/nsss_switch_pwd_read.o src/libnsss/nsss_switch_pwd_rewind.o src/libnsss/nsss_switch_query.o src/libnsss/nsss_switch_query_mutex.o src/libnsss/nsss_switch_query_start.o src/libnsss/nsss_switch_send.o src/libnsss/nsss_switch_sendv.o src/libnsss/nsss_switch_setgrent.o src/libnsss/nsss_switch_setpwent.o src/libnsss/nsss_switch_setspent.o src/libnsss/nsss_switch_shadow_end.o src/libnsss/nsss_switch_shadow_get.o src/libnsss/nsss_switch_shadow_getbyname.o src/libnsss/nsss_switch_shadow_read.o src/libnsss/nsss_switch_shadow_rewind.o src/libnsss/nsss_switch_set_timeout.o src/libnsss/nsss_switch_start.o src/libnsss/nsss_switch_startf.o src/libnsss/nsss_unix_end.o src/libnsss/nsss_unix_endgrent.o src/libnsss/nsss_unix_endpwent.o src/libnsss/nsss_unix_endspent.o src/libnsss/nsss_unix_field.o src/libnsss/nsss_unix_getgrent.o src/libnsss/nsss_unix_getgrent_r.o src/libnsss/nsss_unix_getgrgid.o src/libnsss/nsss_unix_getgrgid_r.o src/libnsss/nsss_unix_getgrnam.o src/libnsss/nsss_unix_getgrnam_r.o src/libnsss/nsss_unix_getgrouplist.o src/libnsss/nsss_unix_getgrouplist_preadjust.o src/libnsss/nsss_unix_getpwent.o src/libnsss/nsss_unix_getpwent_r.o src/libnsss/nsss_unix_getpwnam.o src/libnsss/nsss_unix_getpwnam_r.o src/libnsss/nsss_unix_getpwuid.o src/libnsss/nsss_unix_getpwuid_r.o src/libnsss/nsss_unix_getspent.o src/libnsss/nsss_unix_getspent_r.o src/libnsss/nsss_unix_getspnam.o src/libnsss/nsss_unix_getspnam_r.o src/libnsss/nsss_unix_grp_get.o src/libnsss/nsss_unix_grp_getbygid.o src/libnsss/nsss_unix_grp_getbyname.o src/libnsss/nsss_unix_grp_getlist.o src/libnsss/nsss_unix_grp_here.o src/libnsss/nsss_unix_maybe_start.o src/libnsss/nsss_unix_pwd_get.o src/libnsss/nsss_unix_pwd_getbyname.o src/libnsss/nsss_unix_pwd_getbyuid.o src/libnsss/nsss_unix_pwd_here.o src/libnsss/nsss_unix_rewind.o src/libnsss/nsss_unix_setgrent.o src/libnsss/nsss_unix_setpwent.o src/libnsss/nsss_unix_setspent.o src/libnsss/nsss_unix_shadow_get.o src/libnsss/nsss_unix_shadow_getbyname.o src/libnsss/nsss_unix_shadow_here.o src/libnsss/nsss_unix_start.o else -libnsss.a.xyzzy: src/libnsss/nsss_all_endgrent.lo src/libnsss/nsss_all_endpwent.lo src/libnsss/nsss_all_endspent.lo src/libnsss/nsss_all_errno.lo src/libnsss/nsss_all_getgrent.lo src/libnsss/nsss_all_getgrent_r.lo src/libnsss/nsss_all_getgrgid.lo src/libnsss/nsss_all_getgrgid_r.lo src/libnsss/nsss_all_getgrnam.lo src/libnsss/nsss_all_getgrnam_r.lo src/libnsss/nsss_all_getgrouplist.lo src/libnsss/nsss_all_getpwent.lo src/libnsss/nsss_all_getpwent_r.lo src/libnsss/nsss_all_getpwnam.lo src/libnsss/nsss_all_getpwnam_r.lo src/libnsss/nsss_all_getpwuid.lo src/libnsss/nsss_all_getpwuid_r.lo src/libnsss/nsss_all_getspent.lo src/libnsss/nsss_all_getspent_r.lo src/libnsss/nsss_all_getspnam.lo src/libnsss/nsss_all_getspnam_r.lo src/libnsss/nsss_all_setgrent.lo src/libnsss/nsss_all_setpwent.lo src/libnsss/nsss_all_setspent.lo src/libnsss/nsss_grp_copy.lo src/libnsss/nsss_grp_here.lo src/libnsss/nsss_grouplist_adjust.lo src/libnsss/nsss_pwd_copy.lo src/libnsss/nsss_pwd_here.lo src/libnsss/nsss_shadow_copy.lo src/libnsss/nsss_shadow_here.lo src/libnsss/nsss_switch_end.lo src/libnsss/nsss_switch_endgrent.lo src/libnsss/nsss_switch_endpwent.lo src/libnsss/nsss_switch_endspent.lo src/libnsss/nsss_switch_enumerator.lo src/libnsss/nsss_switch_getgrent.lo src/libnsss/nsss_switch_getgrent_r.lo src/libnsss/nsss_switch_getgrgid.lo src/libnsss/nsss_switch_getgrgid_r.lo src/libnsss/nsss_switch_getgrnam.lo src/libnsss/nsss_switch_getgrnam_r.lo src/libnsss/nsss_switch_getgrouplist.lo src/libnsss/nsss_switch_getpwent.lo src/libnsss/nsss_switch_getpwent_r.lo src/libnsss/nsss_switch_getpwnam.lo src/libnsss/nsss_switch_getpwnam_r.lo src/libnsss/nsss_switch_getpwuid.lo src/libnsss/nsss_switch_getpwuid_r.lo src/libnsss/nsss_switch_getspent.lo src/libnsss/nsss_switch_getspent_r.lo src/libnsss/nsss_switch_getspnam.lo src/libnsss/nsss_switch_getspnam_r.lo src/libnsss/nsss_switch_grp_end.lo src/libnsss/nsss_switch_grp_get.lo src/libnsss/nsss_switch_grp_getbygid.lo src/libnsss/nsss_switch_grp_getbyname.lo src/libnsss/nsss_switch_grp_getlist.lo src/libnsss/nsss_switch_grp_read.lo src/libnsss/nsss_switch_grp_rewind.lo src/libnsss/nsss_switch_op.lo src/libnsss/nsss_switch_pwd_end.lo src/libnsss/nsss_switch_pwd_get.lo src/libnsss/nsss_switch_pwd_getbyname.lo src/libnsss/nsss_switch_pwd_getbyuid.lo src/libnsss/nsss_switch_pwd_read.lo src/libnsss/nsss_switch_pwd_rewind.lo src/libnsss/nsss_switch_query.lo src/libnsss/nsss_switch_query_mutex.lo src/libnsss/nsss_switch_query_start.lo src/libnsss/nsss_switch_send.lo src/libnsss/nsss_switch_sendv.lo src/libnsss/nsss_switch_setgrent.lo src/libnsss/nsss_switch_setpwent.lo src/libnsss/nsss_switch_setspent.lo src/libnsss/nsss_switch_shadow_end.lo src/libnsss/nsss_switch_shadow_get.lo src/libnsss/nsss_switch_shadow_getbyname.lo src/libnsss/nsss_switch_shadow_read.lo src/libnsss/nsss_switch_shadow_rewind.lo src/libnsss/nsss_switch_set_timeout.lo src/libnsss/nsss_switch_start.lo src/libnsss/nsss_switch_startf.lo src/libnsss/nsss_unix_end.lo src/libnsss/nsss_unix_endgrent.lo src/libnsss/nsss_unix_endpwent.lo src/libnsss/nsss_unix_endspent.lo src/libnsss/nsss_unix_field.lo src/libnsss/nsss_unix_getgrent.lo src/libnsss/nsss_unix_getgrent_r.lo src/libnsss/nsss_unix_getgrgid.lo src/libnsss/nsss_unix_getgrgid_r.lo src/libnsss/nsss_unix_getgrnam.lo src/libnsss/nsss_unix_getgrnam_r.lo src/libnsss/nsss_unix_getgrouplist.lo src/libnsss/nsss_unix_getgrouplist_preadjust.lo src/libnsss/nsss_unix_getpwent.lo src/libnsss/nsss_unix_getpwent_r.lo src/libnsss/nsss_unix_getpwnam.lo src/libnsss/nsss_unix_getpwnam_r.lo src/libnsss/nsss_unix_getpwuid.lo src/libnsss/nsss_unix_getpwuid_r.lo src/libnsss/nsss_unix_getspent.lo src/libnsss/nsss_unix_getspent_r.lo src/libnsss/nsss_unix_getspnam.lo src/libnsss/nsss_unix_getspnam_r.lo src/libnsss/nsss_unix_grp_get.lo src/libnsss/nsss_unix_grp_getbygid.lo src/libnsss/nsss_unix_grp_getbyname.lo src/libnsss/nsss_unix_grp_getlist.lo src/libnsss/nsss_unix_grp_here.lo src/libnsss/nsss_unix_maybe_start.lo src/libnsss/nsss_unix_pwd_get.lo src/libnsss/nsss_unix_pwd_getbyname.lo src/libnsss/nsss_unix_pwd_getbyuid.lo src/libnsss/nsss_unix_pwd_here.lo src/libnsss/nsss_unix_rewind.lo src/libnsss/nsss_unix_setgrent.lo src/libnsss/nsss_unix_setpwent.lo src/libnsss/nsss_unix_setspent.lo src/libnsss/nsss_unix_shadow_get.lo src/libnsss/nsss_unix_shadow_getbyname.lo src/libnsss/nsss_unix_shadow_here.lo src/libnsss/nsss_unix_start.lo +libnsss.a.xyzzy:src/libnsss/nsss_all_endgrent.lo src/libnsss/nsss_all_endpwent.lo src/libnsss/nsss_all_endspent.lo src/libnsss/nsss_all_errno.lo src/libnsss/nsss_all_getgrent.lo src/libnsss/nsss_all_getgrent_r.lo src/libnsss/nsss_all_getgrgid.lo src/libnsss/nsss_all_getgrgid_r.lo src/libnsss/nsss_all_getgrnam.lo src/libnsss/nsss_all_getgrnam_r.lo src/libnsss/nsss_all_getgrouplist.lo src/libnsss/nsss_all_getpwent.lo src/libnsss/nsss_all_getpwent_r.lo src/libnsss/nsss_all_getpwnam.lo src/libnsss/nsss_all_getpwnam_r.lo src/libnsss/nsss_all_getpwuid.lo src/libnsss/nsss_all_getpwuid_r.lo src/libnsss/nsss_all_getspent.lo src/libnsss/nsss_all_getspent_r.lo src/libnsss/nsss_all_getspnam.lo src/libnsss/nsss_all_getspnam_r.lo src/libnsss/nsss_all_setgrent.lo src/libnsss/nsss_all_setpwent.lo src/libnsss/nsss_all_setspent.lo src/libnsss/nsss_grp_copy.lo src/libnsss/nsss_grp_here.lo src/libnsss/nsss_grouplist_adjust.lo src/libnsss/nsss_pwd_copy.lo src/libnsss/nsss_pwd_here.lo src/libnsss/nsss_shadow_copy.lo src/libnsss/nsss_shadow_here.lo src/libnsss/nsss_switch_end.lo src/libnsss/nsss_switch_endgrent.lo src/libnsss/nsss_switch_endpwent.lo src/libnsss/nsss_switch_endspent.lo src/libnsss/nsss_switch_enumerator.lo src/libnsss/nsss_switch_getgrent.lo src/libnsss/nsss_switch_getgrent_r.lo src/libnsss/nsss_switch_getgrgid.lo src/libnsss/nsss_switch_getgrgid_r.lo src/libnsss/nsss_switch_getgrnam.lo src/libnsss/nsss_switch_getgrnam_r.lo src/libnsss/nsss_switch_getgrouplist.lo src/libnsss/nsss_switch_getpwent.lo src/libnsss/nsss_switch_getpwent_r.lo src/libnsss/nsss_switch_getpwnam.lo src/libnsss/nsss_switch_getpwnam_r.lo src/libnsss/nsss_switch_getpwuid.lo src/libnsss/nsss_switch_getpwuid_r.lo src/libnsss/nsss_switch_getspent.lo src/libnsss/nsss_switch_getspent_r.lo src/libnsss/nsss_switch_getspnam.lo src/libnsss/nsss_switch_getspnam_r.lo src/libnsss/nsss_switch_grp_end.lo src/libnsss/nsss_switch_grp_get.lo src/libnsss/nsss_switch_grp_getbygid.lo src/libnsss/nsss_switch_grp_getbyname.lo src/libnsss/nsss_switch_grp_getlist.lo src/libnsss/nsss_switch_grp_read.lo src/libnsss/nsss_switch_grp_rewind.lo src/libnsss/nsss_switch_op.lo src/libnsss/nsss_switch_pwd_end.lo src/libnsss/nsss_switch_pwd_get.lo src/libnsss/nsss_switch_pwd_getbyname.lo src/libnsss/nsss_switch_pwd_getbyuid.lo src/libnsss/nsss_switch_pwd_read.lo src/libnsss/nsss_switch_pwd_rewind.lo src/libnsss/nsss_switch_query.lo src/libnsss/nsss_switch_query_mutex.lo src/libnsss/nsss_switch_query_start.lo src/libnsss/nsss_switch_send.lo src/libnsss/nsss_switch_sendv.lo src/libnsss/nsss_switch_setgrent.lo src/libnsss/nsss_switch_setpwent.lo src/libnsss/nsss_switch_setspent.lo src/libnsss/nsss_switch_shadow_end.lo src/libnsss/nsss_switch_shadow_get.lo src/libnsss/nsss_switch_shadow_getbyname.lo src/libnsss/nsss_switch_shadow_read.lo src/libnsss/nsss_switch_shadow_rewind.lo src/libnsss/nsss_switch_set_timeout.lo src/libnsss/nsss_switch_start.lo src/libnsss/nsss_switch_startf.lo src/libnsss/nsss_unix_end.lo src/libnsss/nsss_unix_endgrent.lo src/libnsss/nsss_unix_endpwent.lo src/libnsss/nsss_unix_endspent.lo src/libnsss/nsss_unix_field.lo src/libnsss/nsss_unix_getgrent.lo src/libnsss/nsss_unix_getgrent_r.lo src/libnsss/nsss_unix_getgrgid.lo src/libnsss/nsss_unix_getgrgid_r.lo src/libnsss/nsss_unix_getgrnam.lo src/libnsss/nsss_unix_getgrnam_r.lo src/libnsss/nsss_unix_getgrouplist.lo src/libnsss/nsss_unix_getgrouplist_preadjust.lo src/libnsss/nsss_unix_getpwent.lo src/libnsss/nsss_unix_getpwent_r.lo src/libnsss/nsss_unix_getpwnam.lo src/libnsss/nsss_unix_getpwnam_r.lo src/libnsss/nsss_unix_getpwuid.lo src/libnsss/nsss_unix_getpwuid_r.lo src/libnsss/nsss_unix_getspent.lo src/libnsss/nsss_unix_getspent_r.lo src/libnsss/nsss_unix_getspnam.lo src/libnsss/nsss_unix_getspnam_r.lo src/libnsss/nsss_unix_grp_get.lo src/libnsss/nsss_unix_grp_getbygid.lo src/libnsss/nsss_unix_grp_getbyname.lo src/libnsss/nsss_unix_grp_getlist.lo src/libnsss/nsss_unix_grp_here.lo src/libnsss/nsss_unix_maybe_start.lo src/libnsss/nsss_unix_pwd_get.lo src/libnsss/nsss_unix_pwd_getbyname.lo src/libnsss/nsss_unix_pwd_getbyuid.lo src/libnsss/nsss_unix_pwd_here.lo src/libnsss/nsss_unix_rewind.lo src/libnsss/nsss_unix_setgrent.lo src/libnsss/nsss_unix_setpwent.lo src/libnsss/nsss_unix_setspent.lo src/libnsss/nsss_unix_shadow_get.lo src/libnsss/nsss_unix_shadow_getbyname.lo src/libnsss/nsss_unix_shadow_here.lo src/libnsss/nsss_unix_start.lo endif +libnsss.pc: EXTRA_LIBS := -lskarnet -lpthread libnsss.so.xyzzy: EXTRA_LIBS := -lskarnet -lpthread -libnsss.so.xyzzy: src/libnsss/nsss_all_endgrent.lo src/libnsss/nsss_all_endpwent.lo src/libnsss/nsss_all_endspent.lo src/libnsss/nsss_all_errno.lo src/libnsss/nsss_all_getgrent.lo src/libnsss/nsss_all_getgrent_r.lo src/libnsss/nsss_all_getgrgid.lo src/libnsss/nsss_all_getgrgid_r.lo src/libnsss/nsss_all_getgrnam.lo src/libnsss/nsss_all_getgrnam_r.lo src/libnsss/nsss_all_getgrouplist.lo src/libnsss/nsss_all_getpwent.lo src/libnsss/nsss_all_getpwent_r.lo src/libnsss/nsss_all_getpwnam.lo src/libnsss/nsss_all_getpwnam_r.lo src/libnsss/nsss_all_getpwuid.lo src/libnsss/nsss_all_getpwuid_r.lo src/libnsss/nsss_all_getspent.lo src/libnsss/nsss_all_getspent_r.lo src/libnsss/nsss_all_getspnam.lo src/libnsss/nsss_all_getspnam_r.lo src/libnsss/nsss_all_setgrent.lo src/libnsss/nsss_all_setpwent.lo src/libnsss/nsss_all_setspent.lo src/libnsss/nsss_grp_copy.lo src/libnsss/nsss_grp_here.lo src/libnsss/nsss_grouplist_adjust.lo src/libnsss/nsss_pwd_copy.lo src/libnsss/nsss_pwd_here.lo src/libnsss/nsss_shadow_copy.lo src/libnsss/nsss_shadow_here.lo src/libnsss/nsss_switch_end.lo src/libnsss/nsss_switch_endgrent.lo src/libnsss/nsss_switch_endpwent.lo src/libnsss/nsss_switch_endspent.lo src/libnsss/nsss_switch_enumerator.lo src/libnsss/nsss_switch_getgrent.lo src/libnsss/nsss_switch_getgrent_r.lo src/libnsss/nsss_switch_getgrgid.lo src/libnsss/nsss_switch_getgrgid_r.lo src/libnsss/nsss_switch_getgrnam.lo src/libnsss/nsss_switch_getgrnam_r.lo src/libnsss/nsss_switch_getgrouplist.lo src/libnsss/nsss_switch_getpwent.lo src/libnsss/nsss_switch_getpwent_r.lo src/libnsss/nsss_switch_getpwnam.lo src/libnsss/nsss_switch_getpwnam_r.lo src/libnsss/nsss_switch_getpwuid.lo src/libnsss/nsss_switch_getpwuid_r.lo src/libnsss/nsss_switch_getspent.lo src/libnsss/nsss_switch_getspent_r.lo src/libnsss/nsss_switch_getspnam.lo src/libnsss/nsss_switch_getspnam_r.lo src/libnsss/nsss_switch_grp_end.lo src/libnsss/nsss_switch_grp_get.lo src/libnsss/nsss_switch_grp_getbygid.lo src/libnsss/nsss_switch_grp_getbyname.lo src/libnsss/nsss_switch_grp_getlist.lo src/libnsss/nsss_switch_grp_read.lo src/libnsss/nsss_switch_grp_rewind.lo src/libnsss/nsss_switch_op.lo src/libnsss/nsss_switch_pwd_end.lo src/libnsss/nsss_switch_pwd_get.lo src/libnsss/nsss_switch_pwd_getbyname.lo src/libnsss/nsss_switch_pwd_getbyuid.lo src/libnsss/nsss_switch_pwd_read.lo src/libnsss/nsss_switch_pwd_rewind.lo src/libnsss/nsss_switch_query.lo src/libnsss/nsss_switch_query_mutex.lo src/libnsss/nsss_switch_query_start.lo src/libnsss/nsss_switch_send.lo src/libnsss/nsss_switch_sendv.lo src/libnsss/nsss_switch_setgrent.lo src/libnsss/nsss_switch_setpwent.lo src/libnsss/nsss_switch_setspent.lo src/libnsss/nsss_switch_shadow_end.lo src/libnsss/nsss_switch_shadow_get.lo src/libnsss/nsss_switch_shadow_getbyname.lo src/libnsss/nsss_switch_shadow_read.lo src/libnsss/nsss_switch_shadow_rewind.lo src/libnsss/nsss_switch_set_timeout.lo src/libnsss/nsss_switch_start.lo src/libnsss/nsss_switch_startf.lo src/libnsss/nsss_unix_end.lo src/libnsss/nsss_unix_endgrent.lo src/libnsss/nsss_unix_endpwent.lo src/libnsss/nsss_unix_endspent.lo src/libnsss/nsss_unix_field.lo src/libnsss/nsss_unix_getgrent.lo src/libnsss/nsss_unix_getgrent_r.lo src/libnsss/nsss_unix_getgrgid.lo src/libnsss/nsss_unix_getgrgid_r.lo src/libnsss/nsss_unix_getgrnam.lo src/libnsss/nsss_unix_getgrnam_r.lo src/libnsss/nsss_unix_getgrouplist.lo src/libnsss/nsss_unix_getgrouplist_preadjust.lo src/libnsss/nsss_unix_getpwent.lo src/libnsss/nsss_unix_getpwent_r.lo src/libnsss/nsss_unix_getpwnam.lo src/libnsss/nsss_unix_getpwnam_r.lo src/libnsss/nsss_unix_getpwuid.lo src/libnsss/nsss_unix_getpwuid_r.lo src/libnsss/nsss_unix_getspent.lo src/libnsss/nsss_unix_getspent_r.lo src/libnsss/nsss_unix_getspnam.lo src/libnsss/nsss_unix_getspnam_r.lo src/libnsss/nsss_unix_grp_get.lo src/libnsss/nsss_unix_grp_getbygid.lo src/libnsss/nsss_unix_grp_getbyname.lo src/libnsss/nsss_unix_grp_getlist.lo src/libnsss/nsss_unix_grp_here.lo src/libnsss/nsss_unix_maybe_start.lo src/libnsss/nsss_unix_pwd_get.lo src/libnsss/nsss_unix_pwd_getbyname.lo src/libnsss/nsss_unix_pwd_getbyuid.lo src/libnsss/nsss_unix_pwd_here.lo src/libnsss/nsss_unix_rewind.lo src/libnsss/nsss_unix_setgrent.lo src/libnsss/nsss_unix_setpwent.lo src/libnsss/nsss_unix_setspent.lo src/libnsss/nsss_unix_shadow_get.lo src/libnsss/nsss_unix_shadow_getbyname.lo src/libnsss/nsss_unix_shadow_here.lo src/libnsss/nsss_unix_start.lo +libnsss.so.xyzzy:src/libnsss/nsss_all_endgrent.lo src/libnsss/nsss_all_endpwent.lo src/libnsss/nsss_all_endspent.lo src/libnsss/nsss_all_errno.lo src/libnsss/nsss_all_getgrent.lo src/libnsss/nsss_all_getgrent_r.lo src/libnsss/nsss_all_getgrgid.lo src/libnsss/nsss_all_getgrgid_r.lo src/libnsss/nsss_all_getgrnam.lo src/libnsss/nsss_all_getgrnam_r.lo src/libnsss/nsss_all_getgrouplist.lo src/libnsss/nsss_all_getpwent.lo src/libnsss/nsss_all_getpwent_r.lo src/libnsss/nsss_all_getpwnam.lo src/libnsss/nsss_all_getpwnam_r.lo src/libnsss/nsss_all_getpwuid.lo src/libnsss/nsss_all_getpwuid_r.lo src/libnsss/nsss_all_getspent.lo src/libnsss/nsss_all_getspent_r.lo src/libnsss/nsss_all_getspnam.lo src/libnsss/nsss_all_getspnam_r.lo src/libnsss/nsss_all_setgrent.lo src/libnsss/nsss_all_setpwent.lo src/libnsss/nsss_all_setspent.lo src/libnsss/nsss_grp_copy.lo src/libnsss/nsss_grp_here.lo src/libnsss/nsss_grouplist_adjust.lo src/libnsss/nsss_pwd_copy.lo src/libnsss/nsss_pwd_here.lo src/libnsss/nsss_shadow_copy.lo src/libnsss/nsss_shadow_here.lo src/libnsss/nsss_switch_end.lo src/libnsss/nsss_switch_endgrent.lo src/libnsss/nsss_switch_endpwent.lo src/libnsss/nsss_switch_endspent.lo src/libnsss/nsss_switch_enumerator.lo src/libnsss/nsss_switch_getgrent.lo src/libnsss/nsss_switch_getgrent_r.lo src/libnsss/nsss_switch_getgrgid.lo src/libnsss/nsss_switch_getgrgid_r.lo src/libnsss/nsss_switch_getgrnam.lo src/libnsss/nsss_switch_getgrnam_r.lo src/libnsss/nsss_switch_getgrouplist.lo src/libnsss/nsss_switch_getpwent.lo src/libnsss/nsss_switch_getpwent_r.lo src/libnsss/nsss_switch_getpwnam.lo src/libnsss/nsss_switch_getpwnam_r.lo src/libnsss/nsss_switch_getpwuid.lo src/libnsss/nsss_switch_getpwuid_r.lo src/libnsss/nsss_switch_getspent.lo src/libnsss/nsss_switch_getspent_r.lo src/libnsss/nsss_switch_getspnam.lo src/libnsss/nsss_switch_getspnam_r.lo src/libnsss/nsss_switch_grp_end.lo src/libnsss/nsss_switch_grp_get.lo src/libnsss/nsss_switch_grp_getbygid.lo src/libnsss/nsss_switch_grp_getbyname.lo src/libnsss/nsss_switch_grp_getlist.lo src/libnsss/nsss_switch_grp_read.lo src/libnsss/nsss_switch_grp_rewind.lo src/libnsss/nsss_switch_op.lo src/libnsss/nsss_switch_pwd_end.lo src/libnsss/nsss_switch_pwd_get.lo src/libnsss/nsss_switch_pwd_getbyname.lo src/libnsss/nsss_switch_pwd_getbyuid.lo src/libnsss/nsss_switch_pwd_read.lo src/libnsss/nsss_switch_pwd_rewind.lo src/libnsss/nsss_switch_query.lo src/libnsss/nsss_switch_query_mutex.lo src/libnsss/nsss_switch_query_start.lo src/libnsss/nsss_switch_send.lo src/libnsss/nsss_switch_sendv.lo src/libnsss/nsss_switch_setgrent.lo src/libnsss/nsss_switch_setpwent.lo src/libnsss/nsss_switch_setspent.lo src/libnsss/nsss_switch_shadow_end.lo src/libnsss/nsss_switch_shadow_get.lo src/libnsss/nsss_switch_shadow_getbyname.lo src/libnsss/nsss_switch_shadow_read.lo src/libnsss/nsss_switch_shadow_rewind.lo src/libnsss/nsss_switch_set_timeout.lo src/libnsss/nsss_switch_start.lo src/libnsss/nsss_switch_startf.lo src/libnsss/nsss_unix_end.lo src/libnsss/nsss_unix_endgrent.lo src/libnsss/nsss_unix_endpwent.lo src/libnsss/nsss_unix_endspent.lo src/libnsss/nsss_unix_field.lo src/libnsss/nsss_unix_getgrent.lo src/libnsss/nsss_unix_getgrent_r.lo src/libnsss/nsss_unix_getgrgid.lo src/libnsss/nsss_unix_getgrgid_r.lo src/libnsss/nsss_unix_getgrnam.lo src/libnsss/nsss_unix_getgrnam_r.lo src/libnsss/nsss_unix_getgrouplist.lo src/libnsss/nsss_unix_getgrouplist_preadjust.lo src/libnsss/nsss_unix_getpwent.lo src/libnsss/nsss_unix_getpwent_r.lo src/libnsss/nsss_unix_getpwnam.lo src/libnsss/nsss_unix_getpwnam_r.lo src/libnsss/nsss_unix_getpwuid.lo src/libnsss/nsss_unix_getpwuid_r.lo src/libnsss/nsss_unix_getspent.lo src/libnsss/nsss_unix_getspent_r.lo src/libnsss/nsss_unix_getspnam.lo src/libnsss/nsss_unix_getspnam_r.lo src/libnsss/nsss_unix_grp_get.lo src/libnsss/nsss_unix_grp_getbygid.lo src/libnsss/nsss_unix_grp_getbyname.lo src/libnsss/nsss_unix_grp_getlist.lo src/libnsss/nsss_unix_grp_here.lo src/libnsss/nsss_unix_maybe_start.lo src/libnsss/nsss_unix_pwd_get.lo src/libnsss/nsss_unix_pwd_getbyname.lo src/libnsss/nsss_unix_pwd_getbyuid.lo src/libnsss/nsss_unix_pwd_here.lo src/libnsss/nsss_unix_rewind.lo src/libnsss/nsss_unix_setgrent.lo src/libnsss/nsss_unix_setpwent.lo src/libnsss/nsss_unix_setspent.lo src/libnsss/nsss_unix_shadow_get.lo src/libnsss/nsss_unix_shadow_getbyname.lo src/libnsss/nsss_unix_shadow_here.lo src/libnsss/nsss_unix_start.lo ifeq ($(strip $(STATIC_LIBS_ARE_PIC)),) libnsssd.a.xyzzy: src/nsssd/nsssd_main.o src/nsssd/nsssd_convert.o else -libnsssd.a.xyzzy: src/nsssd/nsssd_main.lo src/nsssd/nsssd_convert.lo +libnsssd.a.xyzzy:src/nsssd/nsssd_main.lo src/nsssd/nsssd_convert.lo endif +libnsssd.pc: EXTRA_LIBS := -lskarnet libnsssd.so.xyzzy: EXTRA_LIBS := -lskarnet -libnsssd.so.xyzzy: src/nsssd/nsssd_main.lo src/nsssd/nsssd_convert.lo -nsssd-nslcd: EXTRA_LIBS := -lskarnet ${SOCKET_LIB} ${SYSCLOCK_LIB} -nsssd-nslcd: src/nsssd/nsssd-nslcd.o ${LIBNSSSD} -nsssd-switch: EXTRA_LIBS := -lskarnet ${SOCKET_LIB} ${SYSCLOCK_LIB} -nsssd-switch: src/nsssd/nsssd-switch.o ${LIBNSSSD} ${LIBNSSS} -nsssd-unix: EXTRA_LIBS := -lskarnet -nsssd-unix: src/nsssd/nsssd-unix.o ${LIBNSSSD} ${LIBNSSS} -test-all-fallback: EXTRA_LIBS := -lskarnet ${SOCKET_LIB} ${SYSCLOCK_LIB} -test-all-fallback: src/tests/test-all-fallback.o ${LIBNSSS} -test-nsssd-switch: EXTRA_LIBS := -lskarnet ${SOCKET_LIB} ${SYSCLOCK_LIB} -test-nsssd-switch: src/tests/test-nsssd-switch.o ${LIBNSSS} -test-switch: EXTRA_LIBS := -lskarnet ${SOCKET_LIB} ${SYSCLOCK_LIB} -test-switch: src/tests/test-switch.o ${LIBNSSS} -test-unix: EXTRA_LIBS := -lskarnet -test-unix: src/tests/test-unix.o ${LIBNSSS} +libnsssd.so.xyzzy:src/nsssd/nsssd_main.lo src/nsssd/nsssd_convert.lo +nsssd-nslcd: EXTRA_LIBS := ${SOCKET_LIB} ${SYSCLOCK_LIB} +nsssd-nslcd: src/nsssd/nsssd-nslcd.o ${LIBNSSSD} -lskarnet +nsssd-switch: EXTRA_LIBS := ${SOCKET_LIB} ${SYSCLOCK_LIB} +nsssd-switch: src/nsssd/nsssd-switch.o ${LIBNSSSD} ${LIBNSSS} -lskarnet +nsssd-unix: EXTRA_LIBS := +nsssd-unix: src/nsssd/nsssd-unix.o ${LIBNSSSD} ${LIBNSSS} -lskarnet +test-all-fallback: EXTRA_LIBS := ${SOCKET_LIB} ${SYSCLOCK_LIB} +test-all-fallback: src/tests/test-all-fallback.o ${LIBNSSS} -lskarnet +test-nsssd-switch: EXTRA_LIBS := ${SOCKET_LIB} ${SYSCLOCK_LIB} +test-nsssd-switch: src/tests/test-nsssd-switch.o ${LIBNSSS} -lskarnet +test-switch: EXTRA_LIBS := ${SOCKET_LIB} ${SYSCLOCK_LIB} +test-switch: src/tests/test-switch.o ${LIBNSSS} -lskarnet +test-unix: EXTRA_LIBS := +test-unix: src/tests/test-unix.o ${LIBNSSS} -lskarnet INTERNAL_LIBS := diff --git a/package/info b/package/info index a23bf2b..8323879 100644 --- a/package/info +++ b/package/info @@ -1,4 +1,4 @@ package=nsss -version=0.2.0.6 +version=0.2.1.0 category=admin package_macro_name=NSSS diff --git a/package/targets.mak b/package/targets.mak index 06d3672..e7b8b54 100644 --- a/package/targets.mak +++ b/package/targets.mak @@ -12,6 +12,8 @@ test-nsssd-switch \ test-all-fallback LIB_DEFS := NSSS=nsss NSSSD=nsssd +NSSS_DESCRIPTION := The nsss library (user-facing part of nsss, applications link against it) +NSSSD_DESCRIPTION := The nsssd library (non-user-facing part of nsss, only nsss modules link against it) ifneq ($(DO_LIBC_INCLUDES),) EXTRA_INCLUDES := src/include/pwd.h src/include/grp.h src/include/shadow.h diff --git a/tools/gen-deps.sh b/tools/gen-deps.sh index befe021..9e18eb1 100755 --- a/tools/gen-deps.sh +++ b/tools/gen-deps.sh @@ -61,20 +61,23 @@ for dir in $(ls -1 src | grep -v ^include) ; do deps= libs= while read dep ; do - if echo $dep | grep -q -e ^-l -e '^\${.*_LIB}' ; then + if echo $dep | grep -q -e '^-l' -e '^\${.*_LIB}' ; then libs="$libs $dep" + elif echo $dep | grep -q '^\${LIB' ; then + deps="$deps $dep" else deps="$deps src/$dir/$dep" fi done < src/$dir/deps-lib/$file echo 'ifeq ($(strip $(STATIC_LIBS_ARE_PIC)),)' - echo "lib${file}.a.xyzzy:$deps" + echo "lib${file}.a.xyzzy:${deps}" echo else - echo "lib${file}.a.xyzzy:$(echo "$deps" | sed 's/\.o/.lo/g')" + echo "lib${file}.a.xyzzy:$(echo ${deps} | sed 's/\.o/.lo/g')" echo endif - if grep -E "^LIB_DEFS [+:]=" package/targets.mak | grep -qF "$file" ; then + if grep -qE "^LIB_DEFS [+:]= .*=$file" package/targets.mak ; then + echo "lib${file}.pc: EXTRA_LIBS :=${libs}" echo "lib${file}.so.xyzzy: EXTRA_LIBS :=$libs" - echo "lib${file}.so.xyzzy:$(echo "$deps" | sed 's/\.o/.lo/g')" + echo "lib${file}.so.xyzzy:$(echo ${deps} | sed 's/\.o/.lo/g')" else internal_libs="$internal_libs lib${file}.a.xyzzy" fi @@ -84,10 +87,10 @@ for dir in $(ls -1 src | grep -v ^include) ; do deps= libs= while read dep ; do - if echo $dep | grep -q -- \\.o$ ; then + if echo $dep | grep -q \\.o$ ; then dep="src/$dir/$dep" fi - if echo $dep | grep -q -e ^-l -e '^\${.*_LIB}' ; then + if echo $dep | grep -qx '\${.*_LIB}' ; then libs="$libs $dep" else deps="$deps $dep" diff --git a/tools/gen-dotpc.sh b/tools/gen-dotpc.sh new file mode 100755 index 0000000..63c8929 --- /dev/null +++ b/tools/gen-dotpc.sh @@ -0,0 +1,101 @@ +#!/bin/sh -e + +isunique () { + x=$1 + set -- $2 + while test "$#" -gt 0 ; do + if test "$x" = "$1" ; then + return 1 + fi + shift + done + return 0 +} + +uniqit () { + res= + while test "$#" -gt 0 ; do + if isunique "$1" "$res" ; then + res="${res}${res:+ }${1}" + fi + shift + done + printf %s\\n "$res" +} + +filterout () { + res= + filter="$1" + shift + while test "$#" -gt 0 ; do + if isunique "$1" "$filter" ; then + res="${res}${res:+ }${1}" + fi + shift + done + printf %s\\n "$res" +} + +print_requires () { + line= + oldifs="$IFS" + while IFS=" " read condvar usedinlibs pkg ver libs ; do + IFS="$oldifs" + for h ; do + i=lib${h##-l} + for j in $libs ; do + if test "$i" = "$j" ; then + line="${line}${line:+, }${i} >= ${ver}" + fi + done + done + done < package/deps-build + IFS="$oldifs" + echo "Requires: $line" +} + +. package/info + +ilist= +dlist= +slist= + +if test "${includedir}" != /usr/include ; then + ilist="-I${includedir}" +fi +if test -n "${extra_includedirs}" ; then + ilist="${ilist}${ilist:+ }${extra_includedirs}" +fi +ilist=`uniqit ${ilist}` + +if test "${dynlibdir}" != /usr/lib && test "${dynlibdir}" != /lib ; then + dlist="-L${dynlibdir}" +fi + +if test "${libdir}" != /usr/lib && test "${libdir}" != /lib ; then + slist="-L${libdir}" +fi +if test -n "${extra_libdirs}" ; then + slist="${slist}${slist:+ }${extra_libdirs}" +fi +slist="$(filterout "${dlist}" $(uniqit ${slist}))" + +echo "prefix=${prefix}" +echo "includedir=${includedir}" +echo "libdir=${libdir}" +echo "dynlibdir=${dynlibdir}" +echo +echo "Name: ${library}" +echo "Version: ${version}" +echo "Description: ${description:-The ${library} library.}" +echo "URL: ${url:-https://skarnet.org/software/${package}/}" +if test -n "${extra_libs}" ; then + print_requires ${extra_libs} +fi +if test -n "$ilist" ; then + echo "Cflags: ${ilist}" +fi +echo "Libs: ${dlist}${dlist:+ }-l${library}${ldlibs:+ }${ldlibs}" +if test -n "${extra_libs}" ; then + echo "Libs.private: ${slist}${slist:+ }${extra_libs}" +fi -- cgit v1.3.1