From 88d2a9f01d313c330b631f01d6177b2d84426255 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sat, 20 Jan 2018 09:32:09 +0100 Subject: [PATCH] Starting to change name and namespace. --- Makefile.am | 4 ++-- configure.ac | 4 ++-- docs/reference/Makefile.am | 4 ++-- docs/{dbtransformer.dtd => zakdbt.dtd} | 0 libdbtransformer.pc.in => libzakdbt.pc.in | 6 +++--- src/Makefile.am | 10 +++++----- src/dbtransformer.c | 18 +++++++++--------- src/{libdbtransformer.h => libzakdbt.h} | 0 tests/Makefile.am | 4 ++-- tests/test.c | 2 +- 10 files changed, 26 insertions(+), 26 deletions(-) rename docs/{dbtransformer.dtd => zakdbt.dtd} (100%) rename libdbtransformer.pc.in => libzakdbt.pc.in (61%) rename src/{libdbtransformer.h => libzakdbt.h} (100%) diff --git a/Makefile.am b/Makefile.am index 2d6bb2d..8723926 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,10 +4,10 @@ SUBDIRS = src tests docs ACLOCAL_AMFLAGS = -I m4 -EXTRA_DIST = libdbtransformer.pc.in +EXTRA_DIST = libzakdbt.pc.in pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libdbtransformer.pc +pkgconfig_DATA = libzakdbt.pc distclean-local: if test "$(srcdir)" = "."; then :; else \ diff --git a/configure.ac b/configure.ac index 64e8829..40980dc 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.65) -AC_INIT([libdbtransformers], [0.0.1], [azagli@libero.it]) +AC_INIT([libzakdbt], [0.0.1], [azagli@libero.it]) AC_CONFIG_SRCDIR([src/dbtransformer.c]) AC_CONFIG_HEADER([config.h]) @@ -48,7 +48,7 @@ AC_C_CONST # Checks for library functions. AC_CONFIG_FILES([ - libdbtransformer.pc + libzakdbt.pc Makefile src/Makefile tests/Makefile diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index 8d64f79..7c6bdf9 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -9,7 +9,7 @@ AUTOMAKE_OPTIONS = 1.6 # of using the various options. # The name of the module, e.g. 'glib'. -DOC_MODULE=dbtransformer +DOC_MODULE=zakdbt # Uncomment for versioned docs and specify the version of the module, e.g. '2'. #DOC_MODULE_VERSION=2 @@ -79,7 +79,7 @@ expand_content_files= # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) GTKDOC_CFLAGS=-I$(top_srcdir)/src $(DBT_CFLAGS) -GTKDOC_LIBS=$(top_builddir)/src/libdbtransformer.la $(DBT_LIBS) +GTKDOC_LIBS=$(top_builddir)/src/libzakdbt.la $(DBT_LIBS) # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make diff --git a/docs/dbtransformer.dtd b/docs/zakdbt.dtd similarity index 100% rename from docs/dbtransformer.dtd rename to docs/zakdbt.dtd diff --git a/libdbtransformer.pc.in b/libzakdbt.pc.in similarity index 61% rename from libdbtransformer.pc.in rename to libzakdbt.pc.in index da9a23f..89ba036 100644 --- a/libdbtransformer.pc.in +++ b/libzakdbt.pc.in @@ -4,8 +4,8 @@ libdir=@libdir@ includedir=@includedir@ Name: @PACKAGE_NAME@ -Description: Class to manage authorizations. +Description: Class to manage db changes. Version: @PACKAGE_VERSION@ -Requires: glib-2.0 -Libs: -L${libdir} -lautoz +Requires: libgda-5.0 libxslt +Libs: -L${libdir} -lzakdbt Cflags: -I${includedir} diff --git a/src/Makefile.am b/src/Makefile.am index 41a3c7b..a9d7518 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,12 +2,12 @@ LIBS = $(DBT_LIBS) AM_CPPFLAGS = $(DBT_CFLAGS) -lib_LTLIBRARIES = libdbtransformer.la +lib_LTLIBRARIES = libzakdbt.la -libdbtransformer_la_SOURCES = dbtransformer.c +libzakdbt_la_SOURCES = dbtransformer.c -libdbtransformer_la_LDFLAGS = -no-undefined +libzakdbt_la_LDFLAGS = -no-undefined -libdbtransformer_include_HEADERS = libdbtransformer.h +libzakdbt_include_HEADERS = libzakdbt.h -libdbtransformer_includedir = $(includedir) +libzakdbt_includedir = $(includedir)/$(PACKAGE) diff --git a/src/dbtransformer.c b/src/dbtransformer.c index 7173235..2315772 100644 --- a/src/dbtransformer.c +++ b/src/dbtransformer.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Andrea Zagli + * Copyright (C) 2010-2018 Andrea Zagli * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -31,7 +31,7 @@ #include -#include "libdbtransformer.h" +#include "libzakdbt.h" static gchar *str_xslt_doc = "\n" @@ -332,7 +332,7 @@ dbt_set_xml_from_filename (Dbt *dbt, const gchar *filename) filen = g_strstrip (g_strdup (filename)); - g_return_if_fail (g_strcmp0 (filen, "") != 0); + g_return_if_fail (g_strcmp0 (filen, "") != 0); /* TODO validate against DTD */ @@ -503,7 +503,7 @@ dbt_check_db (Dbt *dbt, gboolean create_tables) { return ret; } - + /* table doesn't exist */ GdaServerOperation *op; gint i; @@ -520,7 +520,7 @@ dbt_check_db (Dbt *dbt, gboolean create_tables) /* Set parameter's values */ /* table name */ gda_server_operation_set_value_at (op, "dbt_transformations", &error, "/TABLE_DEF_P/TABLE_NAME"); - + /* "id" field */ i = 0; gda_server_operation_set_value_at (op, "id", &error, "/FIELDS_A/@COLUMN_NAME/%d", i); @@ -546,7 +546,7 @@ dbt_check_db (Dbt *dbt, gboolean create_tables) error != NULL && error->message != NULL ? error->message : "no detail"); return ret; } - g_object_unref (op); + g_object_unref (op); } } @@ -918,7 +918,7 @@ dbt_parse_rename_table (Dbt *dbt, xmlNodePtr xnode) error != NULL && error->message != NULL ? error->message : "No detail"); ret = FALSE; } - g_object_unref (op); + g_object_unref (op); } else { @@ -1178,7 +1178,7 @@ g_debug("%s",gda_server_provider_render_operation(priv->gda_provider, priv->gda_ error != NULL && error->message != NULL ? error->message : "no detail"); ret = FALSE; } - g_object_unref (op); + g_object_unref (op); } else { @@ -1240,7 +1240,7 @@ dbt_parse_drop_index (Dbt *dbt, xmlNodePtr xnode) error != NULL && error->message != NULL ? error->message : "No detail"); ret = FALSE; } - g_object_unref (op); + g_object_unref (op); } else { diff --git a/src/libdbtransformer.h b/src/libzakdbt.h similarity index 100% rename from src/libdbtransformer.h rename to src/libzakdbt.h diff --git a/tests/Makefile.am b/tests/Makefile.am index f54f871..6d61596 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -6,6 +6,6 @@ AM_CPPFLAGS = $(DBT_CFLAGS) \ noinst_PROGRAMS = test -LDADD = $(top_builddir)/src/libdbtransformer.la +LDADD = $(top_builddir)/src/libzakdbt.la -EXTRA_DIST = +EXTRA_DIST = diff --git a/tests/test.c b/tests/test.c index 41bccca..98a8620 100644 --- a/tests/test.c +++ b/tests/test.c @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "libdbtransformer.h" +#include "libzakdbt.h" Dbt *dbt; -- 2.49.0