summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--INSTALL2
-rw-r--r--Makefile45
-rwxr-xr-xconfigure14
-rw-r--r--doc/index.html4
-rw-r--r--doc/upgrade.html6
-rw-r--r--package/info2
-rwxr-xr-xtools/gen-deps.sh4
7 files changed, 54 insertions, 23 deletions
diff --git a/INSTALL b/INSTALL
index 78d753e..9506d2f 100644
--- a/INSTALL
+++ b/INSTALL
@@ -6,7 +6,7 @@ Build Instructions
 
   - A Linux-based system with a standard C development environment
   - GNU make version 4.0 or later
-  - skalibs version 2.3.5.1 or later: http://skarnet.org/software/skalibs/
+  - skalibs version 2.3.6.1 or later: http://skarnet.org/software/skalibs/
 
  This software is Linux-specific. It will run on a Linux kernel,
 version 2.6.32 or later.
diff --git a/Makefile b/Makefile
index 3d49943..29a1875 100644
--- a/Makefile
+++ b/Makefile
@@ -18,9 +18,24 @@ STATIC_LIBS :=
 SHARED_LIBS :=
 INTERNAL_LIBS :=
 EXTRA_TARGETS :=
+LIB_DEFS :=
 
 -include config.mak
+
+define library_definition =
+LIB$(firstword $(subst =, ,$(1))) := lib$(lastword $(subst =, ,$(1))).$(if $(DO_ALLSTATIC),a,so).xyzzy
+ifdef DO_SHARED
+SHARED_LIBS += lib$(lastword $(subst =, ,$(1))).so.xyzzy
+endif
+ifdef DO_STATIC
+STATIC_LIBS += lib$(lastword $(subst =, ,$(1))).a.xyzzy
+endif
+endef
+
 include package/targets.mak
+
+$(foreach var,$(LIB_DEFS),$(eval $(call library_definition,$(var))))
+
 include package/deps.mak
 
 version_m := $(basename $(version))
@@ -67,19 +82,20 @@ ifneq ($(strip $(ALL_BINS)),)
 endif
 
 install: install-dynlib install-libexec install-bin install-sbin install-lib install-include
-install-dynlib: $(SHARED_LIBS:lib%.so=$(DESTDIR)$(dynlibdir)/lib%.so)
+install-dynlib: $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(dynlibdir)/lib%.so)
 install-libexec: $(LIBEXEC_TARGETS:%=$(DESTDIR)$(libexecdir)/%)
 install-bin: $(BIN_TARGETS:%=$(DESTDIR)$(bindir)/%)
 install-sbin: $(SBIN_TARGETS:%=$(DESTDIR)$(sbindir)/%)
-install-lib: $(STATIC_LIBS:lib%.a=$(DESTDIR)$(libdir)/lib%.a)
+install-lib: $(STATIC_LIBS:lib%.a.xyzzy=$(DESTDIR)$(libdir)/lib%.a)
 install-include: $(ALL_INCLUDES:src/include/$(package)/%.h=$(DESTDIR)$(includedir)/$(package)/%.h)
+install-data: $(ALL_DATA:src/etc/%=$(DESTDIR)$(datadir)/%)
 
 ifneq ($(exthome),)
 
 update:
 	exec $(INSTALL) -l $(notdir $(home)) $(DESTDIR)$(exthome)
 
-global-links: $(DESTDIR)$(exthome) $(SHARED_LIBS:lib%.so=$(DESTDIR)$(sproot)/library.so/lib%.so) $(BIN_TARGETS:%=$(DESTDIR)$(sproot)/command/%) $(SBIN_TARGETS:%=$(DESTDIR)$(sproot)/command/%)
+global-links: $(DESTDIR)$(exthome) $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(sproot)/library.so/lib%.so) $(BIN_TARGETS:%=$(DESTDIR)$(sproot)/command/%) $(SBIN_TARGETS:%=$(DESTDIR)$(sproot)/command/%)
 
 $(DESTDIR)$(sproot)/command/%: $(DESTDIR)$(home)/command/%
 	exec $(INSTALL) -D -l ..$(subst $(sproot),,$(exthome))/command/$(<F) $@
@@ -91,12 +107,15 @@ $(DESTDIR)$(sproot)/library.so/lib%.so: $(DESTDIR)$(dynlibdir)/lib%.so
 
 endif
 
-$(DESTDIR)$(dynlibdir)/lib%.so: lib%.so
+$(DESTDIR)$(datadir)/%: src/etc/%
+	exec $(INSTALL) -D -m 644 $< $@
+
+$(DESTDIR)$(dynlibdir)/lib%.so: lib%.so.xyzzy
 	$(INSTALL) -D -m 755 $< $@.$(version) && \
-	$(INSTALL) -l $<.$(version) $@.$(version_m) && \
-	$(INSTALL) -l $<.$(version_m) $@.$(version_M) && \
-	$(INSTALL) -l $<.$(version_M) $@.$(version_l) && \
-	exec $(INSTALL) -l $<.$(version_l) $@
+	$(INSTALL) -l $(@F).$(version) $@.$(version_m) && \
+	$(INSTALL) -l $(@F).$(version_m) $@.$(version_M) && \
+	$(INSTALL) -l $(@F).$(version_M) $@.$(version_l) && \
+	exec $(INSTALL) -l $(@F).$(version_l) $@
 
 $(DESTDIR)$(libexecdir)/% $(DESTDIR)$(bindir)/% $(DESTDIR)$(sbindir)/%: % package/modes
 	exec $(INSTALL) -D -m 600 $< $@
@@ -104,7 +123,7 @@ $(DESTDIR)$(libexecdir)/% $(DESTDIR)$(bindir)/% $(DESTDIR)$(sbindir)/%: % packag
 	if [ x$$owner != x ] ; then chown -- $$owner $@ ; fi && \
 	chmod $$mode $@ ; }
 
-$(DESTDIR)$(libdir)/lib%.a: lib%.a
+$(DESTDIR)$(libdir)/lib%.a: lib%.a.xyzzy
 	exec $(INSTALL) -D -m 644 $< $@
 
 $(DESTDIR)$(includedir)/$(package)/%.h: src/include/$(package)/%.h
@@ -119,13 +138,13 @@ $(DESTDIR)$(includedir)/$(package)/%.h: src/include/$(package)/%.h
 $(ALL_BINS):
 	exec $(REALCC) -o $@ $(CFLAGS_ALL) $(LDFLAGS_ALL) $(LDFLAGS_NOSHARED) $^ $(EXTRA_LIBS) $(LDLIBS_ALL)
 
-lib%.a:
+lib%.a.xyzzy:
 	exec $(AR) rc $@ $^
 	exec $(RANLIB) $@
 
-lib%.so:
-	exec $(REALCC) -o $@ $(CFLAGS_ALL) $(CFLAGS_SHARED) $(LDFLAGS_ALL) $(LDFLAGS_SHARED) -Wl,-soname,$@.$(version_l) $^
+lib%.so.xyzzy:
+	exec $(REALCC) -o $@ $(CFLAGS_ALL) $(CFLAGS_SHARED) $(LDFLAGS_ALL) $(LDFLAGS_SHARED) -Wl,-soname,$(patsubst lib%.so.xyzzy,lib%.so.$(version_l),$@) $^
 
-.PHONY: it all clean distclean tgz strip install install-dynlib install-bin install-sbin install-lib install-include
+.PHONY: it all clean distclean tgz strip install install-dynlib install-bin install-sbin install-lib install-include install-data
 
 .DELETE_ON_ERROR:
diff --git a/configure b/configure
index d8d62e8..23bef2c 100755
--- a/configure
+++ b/configure
@@ -23,6 +23,7 @@ Fine tuning of the installation directories:
   --libexecdir=DIR              package-scoped executables [EPREFIX/libexec]
   --libdir=DIR                  static library files [PREFIX/lib/$package]
   --includedir=DIR              C header files [PREFIX/include]
+  --datadir=DIR                 global configuration files [PREFIX/etc]
 
  If no --prefix option is given, by default libdir (but not dynlibdir) will be
  /usr/lib/$package, and includedir will be /usr/include.
@@ -132,6 +133,7 @@ bindir='$exec_prefix/bin'
 sbindir='$exec_prefix/sbin'
 libdir='$prefix/lib/$package'
 includedir='$prefix/include'
+datadir='$prefix/etc'
 sysdeps='$prefix/lib/skalibs/sysdeps'
 manualsysdeps=false
 shared=false
@@ -160,6 +162,7 @@ for arg ; do
     --sbindir=*) sbindir=${arg#*=} ;;
     --libdir=*) libdir=${arg#*=} ;;
     --includedir=*) includedir=${arg#*=} ;;
+    --datadir=*) datadir=${arg#*=} ;;
     --with-sysdeps=*) sysdeps=${arg#*=} manualsysdeps=true ;;
     --with-include=*) var=${arg#*=} ; stripdir var ; addincpath="$addincpath -I$var" ;;
     --with-lib=*) var=${arg#*=} ; stripdir var ; addlibspath="$addlibspath -L$var" ; vpaths="$vpaths $var" ;;
@@ -201,7 +204,7 @@ fi
 
 # Expand installation directories
 stripdir prefix
-for i in exec_prefix dynlibdir libexecdir bindir sbindir libdir includedir sysdeps sproot skalibs ; do
+for i in exec_prefix dynlibdir libexecdir bindir sbindir libdir includedir datadir sysdeps sproot skalibs ; do
   eval tmp=\${$i}
   eval $i=$tmp
   stripdir $i
@@ -335,6 +338,7 @@ bindir := $bindir
 sbindir := $sbindir
 libdir := $libdir
 includedir := $includedir
+datadir := $datadir
 sysdeps := $sysdeps
 slashpackage := $slashpackage
 sproot := $sproot
@@ -354,14 +358,15 @@ LDFLAGS := $LDFLAGS_AUTO
 LDFLAGS_NOSHARED := $LDFLAGS_NOSHARED
 CROSS_COMPILE := $cross
 
-vpath lib%a$vpaths
+vpath lib%.a$vpaths
+vpath lib%.so$vpathd
 EOF
 if $allstatic ; then
   echo ".LIBPATTERNS := lib%.a"
   echo "DO_ALLSTATIC := 1"
-  vpathd=
+else
+  echo ".LIBPATTERNS := lib%.so"
 fi
-  echo "vpath lib%.so$vpathd"
 if $static ; then
   echo "DO_STATIC := 1"
 else
@@ -388,6 +393,7 @@ cat <<EOF
 #define ${package_macro_name}_CONFIG_H
 
 #define ${package_macro_name}_VERSION "$version"
+#define ${package_macro_name}_ETC "$datadir"
 EOF
 if $slashpackage ; then
   echo "#define ${package_macro_name}_BINPREFIX \"$binprefix/\""
diff --git a/doc/index.html b/doc/index.html
index 1d2c885..6ed3234 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -33,7 +33,7 @@
  <li> A Linux-based system with a standard C development environment </li>
  <li> GNU make, version 4.0 or later </li>
  <li> <a href="http://skarnet.org/software/skalibs/">skalibs</a> version
-2.3.5.1 or later. It's a build-time requirement. It's also a run-time
+2.3.6.1 or later. It's a build-time requirement. It's also a run-time
 requirement if you link against the shared version of the skalibs
 library. </li>
 </ul>
@@ -48,7 +48,7 @@ library. </li>
 <h3> Download </h3>
 
 <ul>
- <li> The current released version of s6-linux-utils is <a href="s6-linux-utils-2.0.2.1.tar.gz">2.0.2.1</a>. </li>
+ <li> The current released version of s6-linux-utils is <a href="s6-linux-utils-2.0.2.2.tar.gz">2.0.2.2</a>. </li>
  <li> Alternatively, you can checkout a copy of the s6-linux-utils git repository:
 <pre> git clone git://git.skarnet.org/s6-linux-utils </pre> </li>
 </ul>
diff --git a/doc/upgrade.html b/doc/upgrade.html
index a99d029..3c476ab 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -18,6 +18,12 @@
 
 <h1> What has changed in s6-linux-utils </h1>
 
+<h2> in 2.0.2.2 </h2>
+
+<ul>
+ <li> skalibs dependency bumped to 2.3.6.1 </li>
+</ul>
+
 <h2> in 2.0.2.1 </h2>
 
 <ul>
diff --git a/package/info b/package/info
index 52fab87..2dabc3f 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
 package=s6-linux-utils
-version=2.0.2.1
+version=2.0.2.2
 category=admin
 package_macro_name=S6_LINUX_UTILS
diff --git a/tools/gen-deps.sh b/tools/gen-deps.sh
index 2f7c57d..1ca66ea 100755
--- a/tools/gen-deps.sh
+++ b/tools/gen-deps.sh
@@ -60,8 +60,8 @@ for dir in $(ls -1 src | grep -v ^include) ; do
     while read dep ; do
       deps="$deps src/$dir/$dep"
     done < src/$dir/deps-lib/$file
-    echo "lib$file.a: $deps"
-    echo "lib${file}.so: $(echo "$deps" | sed 's/\.o/.lo/g')"
+    echo "lib$file.a.xyzzy: $deps"
+    echo "lib${file}.so.xyzzy: $(echo "$deps" | sed 's/\.o/.lo/g')"
   done
 
   for file in $(ls -1 src/$dir/deps-exe) ; do