From cadb9634758c823728cc2d026a8286358b5f90b9 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Sat, 31 May 2014 18:56:07 +0200 Subject: [PATCH 1/2] remove LIBPSL_API_VERSION for simplicity --- Makefile.am | 2 +- configure.ac | 4 ++-- docs/libpsl/version.xml.in | 2 +- libpsl.pc.in | 4 ++-- src/Makefile.am | 8 ++++---- tests/Makefile.am | 2 +- tools/Makefile.am | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile.am b/Makefile.am index 1523ed7..bc329fa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,6 +11,6 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man ## pkg-config files are also used for architecture-independent data packages, ## in which case the correct install location would be $(datadir)/pkgconfig. pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libpsl-$(LIBPSL_API_VERSION).pc +pkgconfig_DATA = libpsl.pc EXTRA_DIST = config.rpath diff --git a/configure.ac b/configure.ac index e87579b..7712005 100644 --- a/configure.ac +++ b/configure.ac @@ -64,7 +64,7 @@ AS_IF([ test "$enable_man" != no ], [ # 5. If any interfaces have been added since the last public release, then increment age. # 6. If any interfaces have been removed or changed since the last public release, then set age to 0. AC_SUBST([LIBPSL_SO_VERSION], [0:4:0]) -AC_SUBST([LIBPSL_API_VERSION], [0.2]) +AC_SUBST([LIBPSL_VERSION], $VERSION) # Check for idn2 AC_CHECK_PROG(HAVE_IDN2, idn2, yes, AC_MSG_ERROR(Cannot find required tool 'idn2'.)) @@ -126,7 +126,7 @@ AC_CONFIG_FILES([Makefile docs/libpsl/version.xml data/Makefile tests/Makefile - libpsl-${LIBPSL_API_VERSION}.pc:libpsl.pc.in]) + libpsl.pc:libpsl.pc.in]) AC_OUTPUT AC_MSG_NOTICE([Summary of build options: diff --git a/docs/libpsl/version.xml.in b/docs/libpsl/version.xml.in index 3f2b373..72fdcab 100644 --- a/docs/libpsl/version.xml.in +++ b/docs/libpsl/version.xml.in @@ -1 +1 @@ -@LIBPSL_API_VERSION@ +@LIBPSL_VERSION@ diff --git a/libpsl.pc.in b/libpsl.pc.in index 13ffa3c..b04a358 100644 --- a/libpsl.pc.in +++ b/libpsl.pc.in @@ -7,5 +7,5 @@ Name: @PACKAGE_NAME@ Description: Publix Suffix List C library. Version: @PACKAGE_VERSION@ URL: @PACKAGE_URL@ -Libs: -L${libdir} -llibpsl-@LIBPSL_API_VERSION@ -Cflags: -I${includedir}/libpsl-@LIBPSL_API_VERSION@ -I${libdir}/libpsl-@LIBPSL_API_VERSION@/include +Libs: -L${libdir} -llibpsl +Cflags: -I${includedir}/libpsl -I${libdir}/libpsl/include diff --git a/src/Makefile.am b/src/Makefile.am index 7a584bb..93010e4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,12 +4,12 @@ BUILT_SOURCES = suffixes.c # suffixes.c is a built source that must be cleaned CLEANFILES = suffixes.c -lib_LTLIBRARIES = libpsl-@LIBPSL_API_VERSION@.la +lib_LTLIBRARIES = libpsl.la -libpsl_@LIBPSL_API_VERSION@_la_SOURCES = psl.c -libpsl_@LIBPSL_API_VERSION@_la_CPPFLAGS = -I$(top_srcdir)/include +libpsl_la_SOURCES = psl.c +libpsl_la_CPPFLAGS = -I$(top_srcdir)/include # include ABI version information -libpsl_@LIBPSL_API_VERSION@_la_LDFLAGS = -version-info $(LIBPSL_SO_VERSION) +libpsl_la_LDFLAGS = -version-info $(LIBPSL_SO_VERSION) noinst_PROGRAMS = psl2c psl2c_SOURCES = psl2c.c diff --git a/tests/Makefile.am b/tests/Makefile.am index e200a22..9234320 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ DEFS = @DEFS@ -DDATADIR=\"$(top_srcdir)/data\" -DSRCDIR=\"$(srcdir)\" -DPSL_FILE=\"$(PSL_FILE)\" -DPSL_TESTFILE=\"$(PSL_TESTFILE)\" AM_CPPFLAGS = -I$(top_srcdir)/include -LDADD = ../src/libpsl-@LIBPSL_API_VERSION@.la +LDADD = ../src/libpsl.la if WITH_BUILTIN diff --git a/tools/Makefile.am b/tools/Makefile.am index 397a6de..38d72f5 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -2,4 +2,4 @@ bin_PROGRAMS = psl AM_CPPFLAGS = -I$(top_srcdir)/include AM_LDFLAGS = -static -LDADD = ../src/libpsl-@LIBPSL_API_VERSION@.la +LDADD = ../src/libpsl.la From ecdadf76e53b6b8cf262f58bd47c9549767e5b7e Mon Sep 17 00:00:00 2001 From: Tim Ruehsen Date: Sat, 31 May 2014 19:33:30 +0200 Subject: [PATCH 2/2] added psl_get_version(), bumped version to 0.2.5 --- NEWS | 10 +++++++--- configure.ac | 4 ++-- docs/libpsl/libpsl-sections.txt | 1 + include/libpsl.h | 3 +++ src/psl.c | 14 ++++++++++++++ 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index c54d3c8..8faee0e 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,11 @@ Copyright (C) 2014 Tim Ruehsen -30.05.2014 - * Fixed psl_builtin() to return NULL if no built-in PSL data is available +31.05.2014 Release V0.2.5 + * added psl_get_version() + * removed version from library name + +30.05.2014 Release V0.2.4 + * fixed psl_builtin() to return NULL if no built-in PSL data is available 27.05.2014 Release V0.2.3 * changed API version to 0.2 @@ -12,6 +16,6 @@ Copyright (C) 2014 Tim Ruehsen * build static library by default 25.04.2014 Hotfix release V0.2.1 - * Updated to the latest Publix Suffix List + * updated to the latest Publix Suffix List 25.04.2014 Initial release V0.2 diff --git a/configure.ac b/configure.ac index 7712005..705c5d5 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ -AC_INIT([libpsl], [0.2.4], [tim.ruehsen@gmx.de], [libpsl], [http://github.com/rockdaboot/libpsl]) +AC_INIT([libpsl], [0.2.5], [tim.ruehsen@gmx.de], [libpsl], [http://github.com/rockdaboot/libpsl]) AC_PREREQ([2.59]) AM_INIT_AUTOMAKE([1.10 -Wall no-define]) @@ -63,7 +63,7 @@ AS_IF([ test "$enable_man" != no ], [ # 4. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0. # 5. If any interfaces have been added since the last public release, then increment age. # 6. If any interfaces have been removed or changed since the last public release, then set age to 0. -AC_SUBST([LIBPSL_SO_VERSION], [0:4:0]) +AC_SUBST([LIBPSL_SO_VERSION], [1:0:1]) AC_SUBST([LIBPSL_VERSION], $VERSION) # Check for idn2 diff --git a/docs/libpsl/libpsl-sections.txt b/docs/libpsl/libpsl-sections.txt index c6eaa16..b2b1617 100644 --- a/docs/libpsl/libpsl-sections.txt +++ b/docs/libpsl/libpsl-sections.txt @@ -16,4 +16,5 @@ psl_builtin_file_time psl_builtin_sha1sum psl_builtin_filename psl_is_cookie_domain_acceptable +psl_get_version diff --git a/include/libpsl.h b/include/libpsl.h index a0a1931..265bdf6 100644 --- a/include/libpsl.h +++ b/include/libpsl.h @@ -83,6 +83,9 @@ const char * /* returns file name of PSL source file */ const char * psl_builtin_filename(void); +/* returns library version */ +const char * + psl_get_version(void); #ifdef __cplusplus diff --git a/src/psl.c b/src/psl.c index 77ed564..881052e 100644 --- a/src/psl.c +++ b/src/psl.c @@ -674,6 +674,20 @@ const char *psl_builtin_filename(void) return _psl_filename; } +/** + * psl_get_version: + * + * Get libpsl version. + * + * Returns: String containing version of libpsl. + * + * Since: 0.2.5 + **/ +const char *psl_get_version (void) +{ + return PACKAGE_VERSION; +} + /** * psl_is_cookie_domain_acceptable: * @psl: PSL context pointer