Hello community,

here is the log from the commit of package uthash for openSUSE:Factory checked 
in at 2017-01-25 23:34:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/uthash (Old)
 and      /work/SRC/openSUSE:Factory/.uthash.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "uthash"

Changes:
--------
--- /work/SRC/openSUSE:Factory/uthash/uthash.changes    2016-07-03 
12:28:36.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.uthash.new/uthash.changes       2017-01-25 
23:34:03.425807940 +0100
@@ -1,0 +2,18 @@
+Tue Jan 24 09:53:06 UTC 2017 - jeng...@inai.de
+
+- Rename soname to sover to reflect use of the variable
+- Update description to point out the implementation (and
+  therefore, restrictions). Update RPM group.
+
+-------------------------------------------------------------------
+Sun Jul 10 04:01:35 UTC 2016 - i...@marguerite.su
+
+- update version 2.0.1
+  * add libut library
+  * fix build for GCC 6
+- upstream fixed boo#985142
+- add patch libut-shared.patch
+  * build shared version of libut
+- split new subpackage -devel and libut2
+
+-------------------------------------------------------------------

Old:
----
  v1.9.9.tar.gz

New:
----
  libut-shared.patch
  uthash-2.0.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ uthash.spec ++++++
--- /var/tmp/diff_new_pack.6da1j8/_old  2017-01-25 23:34:03.873740443 +0100
+++ /var/tmp/diff_new_pack.6da1j8/_new  2017-01-25 23:34:03.881739237 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package uthash
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2012 Pascal Bleser <pascal.ble...@opensuse.org>
 #
 # All modifications and additions to the file contributed by third parties
@@ -17,48 +17,83 @@
 #
 
 
+%define sover 2
 Name:           uthash
-Version:        1.9.9
+Version:        2.0.1
 Release:        0
-Summary:        Hash Table for C Structures
+Summary:        Inline hash table for C structures
 License:        BSD-3-Clause
 Group:          Development/Libraries/C and C++
-Url:            http://uthash.sourceforge.net/
-Source:         
https://github.com/troydhanson/uthash/archive/v%{version}.tar.gz
+Url:            https://github.com/troydhanson/uthash
+Source:         
https://github.com/troydhanson/uthash/archive/v%{version}/%{name}-%{version}.tar.gz
 Patch1:         uthash-proceed_with_tests_without_prompt.patch
 Patch2:         uthash-optflags.patch
+Patch3:         libut-shared.patch
 BuildRequires:  pkgconfig
-Provides:       uthash-devel = %{version}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildArch:      noarch
 
 %description
-Any C structure can be stored in a hash table using uthash. Just add a
-UT_hash_handle to the structure and choose one or more fields in your structure
-to act as the key. Then use these macros to store, retrieve or delete items
-from the hash table.
+uthash implements a hash table for C structures. It requires adding
+a UT_hash_handle-typed member to your existing structure definition.
+
+%package devel
+Summary:        Development headers for uthash
+Group:          Development/Libraries/C and C++
+Requires:       libut%{sover} = %{version}
+Obsoletes:      uthash <= 1.9.9
+
+%description devel
+This package provides development headers for uthash, a hash table
+implementation for C structures.
+
+%package -n libut2
+Summary:        Inline hash table for C structures
+Group:          System/Libraries
+
+%description -n libut2
+uthash implements a hash table for C structures. It requires adding
+a UT_hash_handle-typed member to your existing structure definition.
 
 %prep
 %setup -q
-%patch1
-%patch2
-chmod 644 LICENSE
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
+pushd libut
+make DESTDIR=%{buildroot} LIBDIR=%{_libdir} OPTFLAGS="%{optflags}"
+popd
 
 %install
-install -d "%{buildroot}%{_includedir}"
-cp -a src/*.h "%{buildroot}%{_includedir}/"
+pushd libut
+make install DESTDIR=%{buildroot} LIBDIR=%{_libdir} OPTFLAGS="%{optflags}"
+popd
+find %{buildroot} -type f -name "*.a" -delete -print
+
+%check
+pushd libut/tests
+make OPTFLAGS="%{optflags}"
+popd
+pushd tests
+OPTFLAGS="%{optflags}" \
+./all_funcs
+popd
 
-#%check
-#pushd tests
-##OPTFLAGS="%{optflags}" \
-#./all_funcs
-#popd
+%post -n libut%{sover} -p /sbin/ldconfig
 
-%files
+%postun -n libut%{sover} -p /sbin/ldconfig
+
+%files -n libut%{sover}
 %defattr(-,root,root)
 %doc LICENSE README.md
+%{_libdir}/libut.so.%{version}
+%{_libdir}/libut.so.%{sover}
+
+%files devel
+%defattr(-,root,root)
 %{_includedir}/*.h
+%{_libdir}/libut.so
+%{_libdir}/pkgconfig/uthash.pc
 
 %changelog

++++++ libut-shared.patch ++++++
Index: b/libut/Makefile
===================================================================
--- a/libut/Makefile
+++ b/libut/Makefile
@@ -1,33 +1,37 @@
-OBJS=libut.a
-all: $(OBJS) 
+SOURCES = src/libut.c src/ringbuf.c src/utmm.c src/utvector.c
+HEADERS = include/libut.h include/ringbuf.h include/utarray.h include/uthash.h 
include/utlist.h include/utmm.h include/utringbuffer.h include/utstring.h 
include/utvector.h
+OBJS=$(SOURCES:.c=.o)
+all: libut.a libut.so.2.0.1
 INCDIR=./include
+LIBDIR=/usr/lib
 CFLAGS+=-I$(INCDIR)
-CFLAGS+=-Wall -Wextra
-CFLAGS+=-g
+CFLAGS+=-Wall -Wextra -Werror -fPIC
+CFLAGS+=$(OPTFLAGS)
 
-libut.a: libut.o utvector.o utmm.o ringbuf.o
+libut.a: $(OBJS)
        ar r $@ $^
 
-libut.o: src/libut.c $(INCDIR)/libut.h
-       $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
-
-utvector.o: src/utvector.c $(INCDIR)/utvector.h
-       $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
-
-utmm.o: src/utmm.c $(INCDIR)/utmm.h
-       $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
-
-ringbuf.o: src/ringbuf.c $(INCDIR)/ringbuf.h
-       $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
+libut.so.2.0.1: $(OBJS)
+       $(CC) $(CFLAGS) -shared -Wl,-soname,libut.so.2 $^ -o $@
 
 .PHONY: clean tests install
 
 clean:
-       rm -f $(OBJS) *.o
+       rm -f *.o *.a *.so*
        make -C tests clean
 
 tests: libut.a
        make -C tests 
 
-install: libut.a
-       cp $< /usr/local/lib
+install: libut.a libut.so.2.0.1
+       mkdir -p $(DESTDIR)$(LIBDIR)
+       mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
+       mkdir -p $(DESTDIR)/usr/include
+       cp libut.a $(DESTDIR)$(LIBDIR)
+       cp libut.so.2.0.1 $(DESTDIR)$(LIBDIR)
+       ln -sf $(LIBDIR)/libut.so.2.0.1 $(DESTDIR)$(LIBDIR)/libut.so.2
+       ln -sf $(LIBDIR)/libut.so.2.0.1 $(DESTDIR)$(LIBDIR)/libut.so
+       cp ./include/*.h $(DESTDIR)/usr/include
+       sed -i -e "s|VERSION|2.0.1|" uthash.pc.in
+       sed -i -e "s|LIBDIR|$(LIBDIR)|" uthash.pc.in
+       cp uthash.pc.in $(DESTDIR)$(LIBDIR)/pkgconfig/uthash.pc
Index: b/libut/tests/Makefile
===================================================================
--- a/libut/tests/Makefile
+++ b/libut/tests/Makefile
@@ -3,8 +3,8 @@ PROGS=test1 test2 test3 test4 test5 test
 OBJS=$(patsubst %,%.o,$(PROGS))
 
 CFLAGS += -I../include
-CFLAGS += -g
-CFLAGS += -Wall -Wextra
+CFLAGS += -Wall -Wextra -Werror -fPIC
+CFLAGS += $(OPTFLAGS)
 LDFLAGS += -L.. -lut
 
 TEST_TARGET=run_tests
Index: b/libut/uthash.pc.in
===================================================================
--- /dev/null
+++ b/libut/uthash.pc.in
@@ -0,0 +1,9 @@
+prefix=/usr
+libdir=LIBDIR
+includedir=/usr/include
+
+Name: uthash
+Description: C macros for hash tables and more 
+Version: VERSION
+Libs: -L${libdir} -lut
+Cflags: -I${includedir}
++++++ uthash-optflags.patch ++++++
--- /var/tmp/diff_new_pack.6da1j8/_old  2017-01-25 23:34:03.937730800 +0100
+++ /var/tmp/diff_new_pack.6da1j8/_new  2017-01-25 23:34:03.937730800 +0100
@@ -1,14 +1,13 @@
---- tests/Makefile.orig        2012-02-28 06:59:43.004039444 +0100
-+++ tests/Makefile     2012-02-28 07:00:11.846041678 +0100
-@@ -13,9 +13,9 @@
- CFLAGS = -I$(HASHDIR) 
+Index: b/tests/Makefile
+===================================================================
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -17,7 +17,7 @@ PROGS = test1 test2 test3 test4 test5 te
+ CFLAGS += -I$(HASHDIR)
  #CFLAGS += -DHASH_BLOOM=16
  #CFLAGS += -O2
 -CFLAGS += -g
 +CFLAGS += $(OPTFLAGS)
  #CFLAGS += -Wstrict-aliasing=2
--CFLAGS += -Wall 
-+CFLAGS += -Wall
- #CFLAGS += -std=c89
- CFLAGS += ${EXTRA_CFLAGS}
- 
+ CFLAGS += -Wall 
+ #CFLAGS += -Wextra 

++++++ uthash-proceed_with_tests_without_prompt.patch ++++++
--- /var/tmp/diff_new_pack.6da1j8/_old  2017-01-25 23:34:03.949728992 +0100
+++ /var/tmp/diff_new_pack.6da1j8/_new  2017-01-25 23:34:03.949728992 +0100
@@ -1,12 +1,14 @@
---- tests/all_funcs.orig       2012-02-28 06:53:50.612011981 +0100
-+++ tests/all_funcs    2012-02-28 06:58:50.329035345 +0100
+Index: b/tests/all_funcs
+===================================================================
+--- a/tests/all_funcs
++++ b/tests/all_funcs
 @@ -1,8 +1,7 @@
- #!/bin/sh
+ #!/bin/bash
  
  function proceed {
 -  read -p "proceed ? [n] " response
 -  if [ "$response" != "y" ]; then exit -1; fi
-+    :
++  :
  }
  
  make clean tests_only EXTRA_CFLAGS='-DHASH_FUNCTION=HASH_BER'; proceed


Reply via email to