]> mj.ucw.cz Git - libucw.git/commitdiff
Packages: Several fixes in debian packages and their versioning.
authorPavel Charvat <pchar@ucw.cz>
Sat, 7 Dec 2013 10:06:12 +0000 (11:06 +0100)
committerPavel Charvat <pchar@ucw.cz>
Sat, 7 Dec 2013 10:06:12 +0000 (11:06 +0100)
14 files changed:
.gitignore
Makefile
build/Maketop
charset/Makefile
charset/cs2cs.c [deleted file]
charset/ucw-cs2cs.c [new file with mode: 0644]
debian/config
debian/control.in
debian/rules
images/Makefile
ucw/Makefile
ucw/default.cfg
ucw/perl/UCW/Configure/LibUCW.pm
xml/Makefile

index 4643b4ced6e86c76705e84ea1191c20c4d74d121..a1562e2c98baf3888fb57bfff62b27e1633aad6c 100644 (file)
@@ -6,3 +6,4 @@ TAGS
 _*
 *.swp
 .make.log
+debian-tmp
index 68ea310d6b0ba4a61dacdcb61d6944fd0a20d545..24a5071b896537b386e5d4a15d10739dee86bdc2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -67,6 +67,7 @@ include $(BUILDSYS)/Makebottom
 
 ifndef CONFIG_LOCAL
 install: all $(INSTALL_TARGETS)
+       /sbin/ldconfig -n $(DESTDIR)$(INSTALL_LIB_DIR)
 else
 install:
        @echo "Nothing to install, this is a local build." && false
index 4fa79c588281100cc473cc1318d4d5b76225eebd..39e6b0a8ba955a1fdef11a1d859b6c6f1b38b34f 100644 (file)
@@ -74,7 +74,7 @@ clean:: dust
        rm -rf tests run/{bin,lib,include,.tree-stamp,doc}
 
 distclean:: clean
-       rm -rf obj run
+       rm -rf obj run debian-tmp
 
 testclean::
        rm -f `find obj -name "*.test"`
index 9b37fe68449e55f72ee633859aa5a8a3d98666c7..3fb8811c1f7c14afc17e51b099cf4cc58c6b14b8 100644 (file)
@@ -2,20 +2,21 @@
 
 DIRS+=charset
 
+LIBCHARSET_PROGS=
 LIBCHARSET_MODS=toupper tolower tocat toligatures unaccent charconv setnames fb-charconv stk-charconv mp-charconv
 LIBCHARSET_INCLUDES=charconv.h unicat.h fb-charconv.h stk-charconv.h mp-charconv.h
 
 $(o)/charset/libucw-charset.a: $(addsuffix .o,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
 $(o)/charset/libucw-charset-pic.a: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
 $(o)/charset/libucw-charset.so: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
-$(o)/charset/libucw-charset.so: SONAME_SUFFIX=.$(UCW_ABI_VERSION)
+$(o)/charset/libucw-charset.so: SONAME_SUFFIX=.$(UCW_ABI_MAJOR)
 $(o)/charset/libucw-charset.pc: $(LIBUCW)
 
 ifdef CONFIG_STATIC_PIC
 $(o)/charset/libucw-charset.pc: $(o)/charset/libucw-charset-pic.a
 endif
 ifdef CONFIG_INSTALL_API
-$(o)/charset/libucw-charset.pc: $(o)/charset/libucw-charset.a $(o)/charset/libucw-charset-pic.a $(o)/charset/libucw-charset.so
+$(o)/charset/libucw-charset.pc: $(addprefix $(o)/charset/libucw-charset,.a -pic.a .so)
 endif
 
 API_LIBS+=libucw-charset
@@ -25,10 +26,12 @@ $(o)/charset/.include-stamp: IDST=charset
 run/lib/pkgconfig/libucw-charset.pc: $(o)/charset/libucw-charset.pc
 
 ifdef CONFIG_CHARSET_UTILS
-PROGS+=$(o)/charset/cs2cs
+LIBCHARSET_PROGS+=$(o)/charset/ucw-cs2cs
 endif
 
-$(o)/charset/cs2cs: $(o)/charset/cs2cs.o $(LIBUCW) $(o)/charset/libucw-charset.pc
+$(o)/charset/ucw-cs2cs: $(o)/charset/ucw-cs2cs.o $(LIBCHARSET)
+
+PROGS+=$(LIBCHARSET_PROGS)
 
 build_charsets:
        cd $(s)/charset && sh misc/generate
@@ -36,11 +39,11 @@ build_charsets:
 clean::
        rm -f $(s)/charset/misc/u-*
 
-INSTALL_TARGETS+=install-libucw-charset install-libucw-charset-api
+INSTALL_TARGETS+=install-libucw-charset install-libucw-charset-api install-libucw-charset-utils
 
 install-libucw-charset:
        install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
-       install -m 644 run/lib/libucw-charset.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)
+       install -m 644 run/lib/libucw-charset.so.$(UCW_ABI_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset.so.$(UCW_ABI_VERSION)
 
 install-libucw-charset-api:
        install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
@@ -50,4 +53,8 @@ install-libucw-charset-api:
        install -m 644 run/lib/libucw-charset.a $(DESTDIR)$(INSTALL_LIB_DIR)
        install -m 644 run/lib/libucw-charset-pic.a $(DESTDIR)$(INSTALL_LIB_DIR)
 
-.PHONY: install-libucw-charset install-libucw-charset-api
+install-libucw-charset-utils:
+       install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR)
+       install -m 755 $(LIBCHARSET_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR)
+
+.PHONY: install-libucw-charset install-libucw-charset-api install-libucw-charset-utils
diff --git a/charset/cs2cs.c b/charset/cs2cs.c
deleted file mode 100644 (file)
index 4f2a97b..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *     Simple character set convertor
- *
- *     (c) 1998 Pavel Machek <pavel@ucw.cz>
- *     (c) 2003 Martin Mares <mj@ucw.cz>
- *
- *     This software may be freely distributed and used according to the terms
- *     of the GNU General Public License.
- */
-
-#include <ucw/lib.h>
-#include <charset/charconv.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#ifdef TEST
-#define BUFSIZE 13
-#else
-#define BUFSIZE 4096
-#endif
-
-int
-main(int argc, char **argv)
-{
-  struct conv_context ctxt;
-  int ch_from, ch_to, n, flags;
-  char inbuf[BUFSIZE], outbuf[BUFSIZE];
-
-  if (argc != 3)
-    die("cs2cs in-charset out-charset");
-  conv_init(&ctxt);
-  ch_from = find_charset_by_name(argv[1]);
-  if (ch_from < 0)
-    die("Unknown charset %s", argv[1]);
-  ch_to = find_charset_by_name(argv[2]);
-  if (ch_to < 0)
-    die("Unknown charset %s", argv[2]);
-
-  conv_set_charset(&ctxt, ch_from, ch_to);
-  while ((n = read(0, inbuf, sizeof(inbuf))) > 0)
-    {
-      ctxt.source = inbuf;
-      ctxt.source_end = inbuf + n;
-      ctxt.dest = ctxt.dest_start = outbuf;
-      ctxt.dest_end = outbuf + sizeof(outbuf);
-      do
-       {
-         flags = conv_run(&ctxt);
-         if (flags & (CONV_SOURCE_END | CONV_DEST_END))
-           {
-             int w = write(1, ctxt.dest_start, ctxt.dest - ctxt.dest_start);
-             if (w < 0)
-               die("write error: %m");
-             ctxt.dest = outbuf;
-           }
-       }
-      while (! (flags & CONV_SOURCE_END));
-    }
-  if (n < 0)
-    die("read error: %m");
-  return 0;
-}
diff --git a/charset/ucw-cs2cs.c b/charset/ucw-cs2cs.c
new file mode 100644 (file)
index 0000000..74e092a
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ *     Simple character set convertor
+ *
+ *     (c) 1998 Pavel Machek <pavel@ucw.cz>
+ *     (c) 2003 Martin Mares <mj@ucw.cz>
+ *
+ *     This software may be freely distributed and used according to the terms
+ *     of the GNU General Public License.
+ */
+
+#include <ucw/lib.h>
+#include <charset/charconv.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#ifdef TEST
+#define BUFSIZE 13
+#else
+#define BUFSIZE 4096
+#endif
+
+int
+main(int argc, char **argv)
+{
+  struct conv_context ctxt;
+  int ch_from, ch_to, n, flags;
+  char inbuf[BUFSIZE], outbuf[BUFSIZE];
+
+  if (argc != 3)
+    die("ucw-cs2cs in-charset out-charset");
+  conv_init(&ctxt);
+  ch_from = find_charset_by_name(argv[1]);
+  if (ch_from < 0)
+    die("Unknown charset %s", argv[1]);
+  ch_to = find_charset_by_name(argv[2]);
+  if (ch_to < 0)
+    die("Unknown charset %s", argv[2]);
+
+  conv_set_charset(&ctxt, ch_from, ch_to);
+  while ((n = read(0, inbuf, sizeof(inbuf))) > 0)
+    {
+      ctxt.source = inbuf;
+      ctxt.source_end = inbuf + n;
+      ctxt.dest = ctxt.dest_start = outbuf;
+      ctxt.dest_end = outbuf + sizeof(outbuf);
+      do
+       {
+         flags = conv_run(&ctxt);
+         if (flags & (CONV_SOURCE_END | CONV_DEST_END))
+           {
+             int w = write(1, ctxt.dest_start, ctxt.dest - ctxt.dest_start);
+             if (w < 0)
+               die("write error: %m");
+             ctxt.dest = outbuf;
+           }
+       }
+      while (! (flags & CONV_SOURCE_END));
+    }
+  if (n < 0)
+    die("read error: %m");
+  return 0;
+}
index d84eb825aca706a0b7b6e77ced7b26635d04355f..28e0582538f0e468d36de35e03647d5ff85dcffb 100644 (file)
@@ -7,6 +7,7 @@ Set("CONFIG_INSTALL_API");
 
 Set("CONFIG_DOC");
 Set("CONFIG_CHARSET");
+Set("CONFIG_CHARSET_UTILS");
 Set("CONFIG_XML");
 Set("CONFIG_IMAGES");
 UnSet("CONFIG_IMAGES_LIBUNGIF");
index 676bc246a9fe6e1358b1378b43ca48c0fe7c8820..e4d1a14ca097dbb000cff4064aa9de73362abcb2 100644 (file)
@@ -4,7 +4,7 @@ Maintainer: LibUCW developers <libucw-devel@ucw.cz>
 Build-Depends: debhelper (>= 7), devscripts, bash, pkg-config, libjpeg-dev, libpng-dev, libgif-dev, asciidoc
 Standards-Version: 3.8.0
 
-Package: libucw-@UCW_ABI_VERSION@
+Package: libucw-@UCW_ABI_MAJOR@
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
@@ -13,7 +13,7 @@ Description: LibUCW library
 Package: libucw-dev
 Section: libdevel
 Architecture: any
-Depends: libucw-@UCW_ABI_VERSION@ (= @VER@), ${shlibs:Depends}, ${misc:Depends}
+Depends: libucw-@UCW_ABI_MAJOR@ (= @VER@), ${shlibs:Depends}, ${misc:Depends}
 Description: LibUCW development files
 
 Package: libucw-utils
index e4a2bad4ae6f02d9fe0c147b8b4c444278a735bc..aedf76987727e417f0c3dc5c1bd6e34654ce3e93 100755 (executable)
@@ -27,9 +27,9 @@ install: build
        dh_testroot
        dh_clean -k
        dh_installdirs
-       $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-$(UCW_ABI_VERSION) $(addprefix install-,libucw libucw-charset libucw-xml libucw-images)
+       $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-$(UCW_ABI_MAJOR) $(addprefix install-,libucw libucw-charset libucw-xml libucw-images)
        $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-dev $(addprefix install-,$(addsuffix -api,libucw libucw-charset libucw-xml libucw-images))
-       $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-utils install-ucw-utils install-ucw-shell install-libucw-images-utils
+       $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-utils install-ucw-utils install-ucw-shell install-libucw-charset-utils install-libucw-images-utils
        $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-doc install-libucw-docs
 
 binary-indep: build install
index f475127ed7860380c0a97a1512d5a4b04be5cc0c..2a43373e99bc0accdeb4767091044391e45aed9d 100644 (file)
@@ -15,12 +15,12 @@ else
 LIBIMAGES_DEPS=$(LIBUCW)
 endif
 
-ifdef CONFIG_INSTALL_API
-$(o)/images/libucw-images.pc: $(o)/images/libucw-images.a $(o)/images/libucw-images-pic.a $(o)/images/libucw-images.so
-endif
 ifdef CONFIG_STATIC_PIC
 LIBIMAGES_DEPS+=$(o)/images/libucw-images-pic.a
 endif
+ifdef CONFIG_INSTALL_API
+$(o)/images/libucw-images.pc: $(addprefix $(o)/images/libucw-images,.a -pic.a .so)
+endif
 
 ifdef CONFIG_IMAGES_DUP
 LIBIMAGES_PROGS+=$(o)/images/ucw-image-dup-test
@@ -70,7 +70,7 @@ CONFIGS+=$(LIBIMAGES_CONFIGS)
 $(o)/images/libucw-images.a: $(addsuffix .o,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
 $(o)/images/libucw-images-pic.a: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
 $(o)/images/libucw-images.so: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
-$(o)/images/libucw-images.so: SONAME_SUFFIX=.$(UCW_ABI_VERSION)
+$(o)/images/libucw-images.so: SONAME_SUFFIX=.$(UCW_ABI_MAJOR)
 $(o)/images/libucw-images.pc: $(LIBIMAGES_DEPS)
 
 $(o)/images/ucw-image-tool: $(o)/images/ucw-image-tool.o $(LIBIMAGES)
@@ -96,10 +96,10 @@ INSTALL_TARGETS+=install-libucw-images install-libucw-images-api install-libucw-
 
 install-libucw-images:
        install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
-       install -m 644 run/lib/libucw-images.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)
+       install -m 644 run/lib/libucw-images.so.$(UCW_ABI_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-images.so.$(UCW_ABI_VERSION)
 
 install-libucw-images-api:
-       install -d -m 755 $(addprefix $(DESTDIR),$(INSTALL_BIN_DIR) $(INSTALL_INCLUDE_DIR)/images $(INSTALL_LIB_DIR) $(INSTALL_PKGCONFIG_DIR))
+       install -d -m 755 $(addprefix $(DESTDIR),$(INSTALL_INCLUDE_DIR)/images $(INSTALL_LIB_DIR) $(INSTALL_PKGCONFIG_DIR))
        install -m 644 $(addprefix run/include/images/,$(LIBIMAGES_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/images
        install -m 644 run/lib/pkgconfig/libucw-images.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
        ln -sf libucw-images.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-images.so
index 2cd12eb7d6ac32cba0ea96e4d1876c71a7be84c7..873f06e189b9914fc87457728687ffbf476a554a 100644 (file)
@@ -89,13 +89,13 @@ LIBUCW_MOD_PATHS=$(addprefix $(o)/ucw/,$(LIBUCW_MODS))
 $(o)/ucw/libucw.a: $(addsuffix .o,$(LIBUCW_MOD_PATHS))
 $(o)/ucw/libucw-pic.a: $(addsuffix .oo,$(LIBUCW_MOD_PATHS))
 $(o)/ucw/libucw.so: $(addsuffix .oo,$(LIBUCW_MOD_PATHS))
-$(o)/ucw/libucw.so: SONAME_SUFFIX=.$(UCW_ABI_VERSION)
+$(o)/ucw/libucw.so: SONAME_SUFFIX=.$(UCW_ABI_MAJOR)
 
 ifdef CONFIG_STATIC_PIC
 $(o)/ucw/libucw.pc: $(o)/ucw/libucw-pic.a
 endif
 ifdef CONFIG_INSTALL_API
-$(o)/ucw/libucw.pc: $(o)/ucw/libucw.a $(o)/ucw/libucw-pic.a $(o)/ucw/libucw.so
+$(o)/ucw/libucw.pc: $(addprefix $(o)/ucw/libucw,.a -pic.a .so)
 endif
 
 $(o)/ucw/hashfunc.o $(o)/ucw/hashfunc.oo: CFLAGS += -funroll-loops
@@ -188,7 +188,7 @@ INSTALL_TARGETS+=install-libucw install-libucw-api
 
 install-libucw:
        install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
-       install -m 644 run/lib/libucw.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/
+       install -m 644 run/lib/libucw.so.$(UCW_ABI_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw.so.$(UCW_ABI_VERSION)
 
 install-libucw-api:
        install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/ $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
index ec8feabb3ad87ecf87c8a4cce14cda95cb484add..0b643184f0bbc20c888ea82596548bbc1949e258 100644 (file)
@@ -4,7 +4,7 @@
 # Version of the whole package
 Set("UCW_VERSION" => "5.0-dev");
 Set("UCW_VERSION_CODE" => 5000000);
-Set("UCW_ABI_VERSION" => "5.0");
+Set("UCW_ABI_VERSION" => Get("UCW_VERSION_CODE") . ".0");
 
 # Compile everything with debug information and ASSERT's
 UnSet("CONFIG_DEBUG");
index 7feef1e29dbc2c0faeb3f96d113868c058d56123..cdfde1d7842245ea8fe965ad3a9bc1c0037c9688 100644 (file)
@@ -89,6 +89,13 @@ if (IsSet("CONFIG_DARWIN")) {
        }
 }
 
+if (Get("UCW_ABI_VERSION") =~ /^(\d+)\.\d+(\.\d+)?$/) {
+       Set("UCW_ABI_MAJOR", $1);
+}
+else {
+       Fail("Invalid syntax of UCW_ABI_VERSION");
+}
+
 PostConfig {
        AtWrite {
                UCW::Configure::C::ConfigHeader("ucw/autoconf.h", [
index 4a1b2e6b7a9b10fa1a2ff034c9ad2f0653725803..bf1a8096bde9c5a9b2ab2c2de4b78f0eb94e9654 100644 (file)
@@ -12,14 +12,14 @@ LIBXML_MOD_PATHS=$(addprefix $(o)/xml/,$(LIBXML_MODS))
 $(o)/xml/libucw-xml.a: $(addsuffix .o,$(LIBXML_MOD_PATHS))
 $(o)/xml/libucw-xml-pic.a: $(addsuffix .oo,$(LIBXML_MOD_PATHS))
 $(o)/xml/libucw-xml.so: $(addsuffix .oo,$(LIBXML_MOD_PATHS))
-$(o)/xml/libucw-xml.so: SONAME_SUFFIX=.$(UCW_ABI_VERSION)
+$(o)/xml/libucw-xml.so: SONAME_SUFFIX=.$(UCW_ABI_MAJOR)
 $(o)/xml/libucw-xml.pc: $(LIBCHARSET)
 
 ifdef CONFIG_STATIC_PIC
 $(o)/xml/libucw-xml.pc: $(o)/xml/libucw-xml-pic.a
 endif
 ifdef CONFIG_INSTALL_API
-$(o)/xml/libucw-xml.pc: $(o)/xml/libucw-xml.a $(o)/xml/libucw-xml-pic.a $(o)/xml/libucw-xml.so
+$(o)/xml/libucw-xml.pc: $(addprefix $(o)/xml/libucw-xml,.a -pic.a .so)
 endif
 
 $(o)/xml/common.o: $(o)/xml/unicat.h
@@ -49,7 +49,7 @@ INSTALL_TARGETS+=install-libucw-xml install-libucw-xml-api
 
 install-libucw-xml:
        install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
-       install -m 644 run/lib/libucw-xml.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)
+       install -m 644 run/lib/libucw-xml.so.$(UCW_ABI_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-xml.so.$(UCW_ABI_VERSION)
 
 install-libucw-xml-api:
        install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/xml $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)