updated debian packaging
This commit is contained in:
parent
26f740f0a0
commit
56a4a1364a
13 changed files with 42 additions and 511 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,3 +1,6 @@
|
||||||
|
# Debian Packaging
|
||||||
|
/.pc/
|
||||||
|
|
||||||
# Binaries
|
# Binaries
|
||||||
/test/test
|
/test/test
|
||||||
/examples/sml_server
|
/examples/sml_server
|
||||||
|
@ -8,6 +11,7 @@
|
||||||
*.o
|
*.o
|
||||||
|
|
||||||
# Compiled Dynamic libraries
|
# Compiled Dynamic libraries
|
||||||
|
*.so.*
|
||||||
*.so
|
*.so
|
||||||
|
|
||||||
# Compiled Static libraries
|
# Compiled Static libraries
|
||||||
|
|
9
debian/changelog
vendored
9
debian/changelog
vendored
|
@ -1,3 +1,12 @@
|
||||||
|
libsml (0.1.1-1~wip) unstable; urgency=low
|
||||||
|
|
||||||
|
* Added sml_value_to_double()
|
||||||
|
* Implemented sml_octet_string_generate_uuid() when not linking against libuuid
|
||||||
|
* Removed trailing whitespaces & unified codestyle
|
||||||
|
* implemented sml profile stuff
|
||||||
|
|
||||||
|
-- Steffen Vogel <info@steffenvogel.de> Fri, 30 Sep 2011 19:16:59 +0200
|
||||||
|
|
||||||
libsml (0.1-5~wip) unstable; urgency=low
|
libsml (0.1-5~wip) unstable; urgency=low
|
||||||
|
|
||||||
* Adapted sml_transport_ for vzlogger
|
* Adapted sml_transport_ for vzlogger
|
||||||
|
|
4
debian/control
vendored
4
debian/control
vendored
|
@ -11,7 +11,7 @@ Vcs-Browser: http://github.com/dailab/libsml
|
||||||
Package: libsml-dev
|
Package: libsml-dev
|
||||||
Section: libdevel
|
Section: libdevel
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: libsml1 (= ${binary:Version}), uuid-dev (>= 2.16)
|
Depends: libsml1 (= ${binary:Version}), uuid-dev (>= 2.16), ${misc:Depends}
|
||||||
Description: Header files for libSML
|
Description: Header files for libSML
|
||||||
This package includes header include files
|
This package includes header include files
|
||||||
and an example for libSML
|
and an example for libSML
|
||||||
|
@ -19,7 +19,7 @@ Description: Header files for libSML
|
||||||
Package: libsml1
|
Package: libsml1
|
||||||
Section: libs
|
Section: libs
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends}
|
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||||
Description: Library for the Smart Messaging Language (SML)
|
Description: Library for the Smart Messaging Language (SML)
|
||||||
libSML is a library which implements the Smart Messaging Language (SML)
|
libSML is a library which implements the Smart Messaging Language (SML)
|
||||||
protocol specified by VDE's Forum Netztechnik/Netzbetrieb (FNN).
|
protocol specified by VDE's Forum Netztechnik/Netzbetrieb (FNN).
|
||||||
|
|
3
debian/copyright
vendored
3
debian/copyright
vendored
|
@ -10,7 +10,8 @@ Upstream Authors:
|
||||||
|
|
||||||
Juri Glass,
|
Juri Glass,
|
||||||
Mathias Runge,
|
Mathias Runge,
|
||||||
Nadim El Sayed
|
Nadim El Sayed,
|
||||||
|
Steffen Vogel
|
||||||
|
|
||||||
Copyright:
|
Copyright:
|
||||||
|
|
||||||
|
|
115
debian/patches/debian-changes-0.1-1
vendored
115
debian/patches/debian-changes-0.1-1
vendored
|
@ -1,115 +0,0 @@
|
||||||
Description: Upstream changes introduced in version 0.1-1
|
|
||||||
This patch has been created by dpkg-source during the package build.
|
|
||||||
Here's the last changelog entry, hopefully it gives details on why
|
|
||||||
those changes were made:
|
|
||||||
.
|
|
||||||
libsml (0.1-1) unstable; urgency=low
|
|
||||||
.
|
|
||||||
* Work in Progress of current git commit
|
|
||||||
.
|
|
||||||
The person named in the Author field signed this changelog entry.
|
|
||||||
Author: Steffen Vogel <info@steffenvogel.de>
|
|
||||||
|
|
||||||
---
|
|
||||||
The information above should follow the Patch Tagging Guidelines, please
|
|
||||||
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
|
||||||
are templates for supplementary fields that you might want to add:
|
|
||||||
|
|
||||||
Origin: <vendor|upstream|other>, <url of original patch>
|
|
||||||
Bug: <url in upstream bugtracker>
|
|
||||||
Bug-Debian: http://bugs.debian.org/<bugnumber>
|
|
||||||
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
|
|
||||||
Forwarded: <no|not-needed|url proving that it has been forwarded>
|
|
||||||
Reviewed-By: <name and email of someone who approved the patch>
|
|
||||||
Last-Update: <YYYY-MM-DD>
|
|
||||||
|
|
||||||
--- libsml-0.1.orig/test/Makefile
|
|
||||||
+++ libsml-0.1/test/Makefile
|
|
||||||
@@ -1,10 +1,11 @@
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
CFLAGS += -I../sml/include/ -Wall
|
|
||||||
+LIBSML = ../sml/lib/libsml.a
|
|
||||||
+LIBS = -luuid
|
|
||||||
+
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
LIBS = -luuid
|
|
||||||
endif
|
|
||||||
-LIBSML = ../sml/lib/libsml.a
|
|
||||||
-
|
|
||||||
|
|
||||||
UNITY = \
|
|
||||||
unity/unity.o \
|
|
||||||
@@ -30,22 +31,18 @@ test_run: libsml test
|
|
||||||
@./test
|
|
||||||
|
|
||||||
test : $(UNITY) $(OBJS) $(LIBSML)
|
|
||||||
- $(CC) $(CFLAGS) $(LIBS) $(LIBSML) $^ test_main.c -o test
|
|
||||||
+ $(CC) $(CFLAGS) $(LIBS) $^ test_main.c -o test
|
|
||||||
|
|
||||||
.PHONY: code
|
|
||||||
libsml :
|
|
||||||
@$(MAKE) -C ../sml
|
|
||||||
|
|
||||||
%.o : %.c
|
|
||||||
- $(CC) $(CFLAGS) $(LIBS) -c $^ -o $@
|
|
||||||
+ $(CC) $(CFLAGS) -c $^ -o $@
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean :
|
|
||||||
@rm -f unity/*.o
|
|
||||||
@rm -f src/*.o
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
+ @rm -f test
|
|
||||||
|
|
||||||
--- libsml-0.1.orig/sml/Makefile
|
|
||||||
+++ libsml-0.1/sml/Makefile
|
|
||||||
@@ -4,6 +4,10 @@ CFLAGS += -I./include/ -fPIC -g -Wall
|
|
||||||
# Available Flags:
|
|
||||||
# _NO_UUID_LIB - compile without uuid lib
|
|
||||||
|
|
||||||
+ifeq ($(UNAME), Linux)
|
|
||||||
+LIBS = -luuid
|
|
||||||
+endif
|
|
||||||
+
|
|
||||||
LIB_DIR=./lib
|
|
||||||
OBJ_LIB=$(LIB_DIR)/libsml.o
|
|
||||||
DYN_LIB=$(LIB_DIR)/libsml.so
|
|
||||||
@@ -45,7 +49,7 @@ libsml: $(ST_LIB) $(OBJ_LIB)
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(DYN_LIB): $(OBJS)
|
|
||||||
- $(LD) -shared -o $@ $^
|
|
||||||
+ $(LD) $(LIBS) -shared -o $@ $^
|
|
||||||
|
|
||||||
$(OBJ_LIB): $(OBJS)
|
|
||||||
$(LD) -r -o $@ $^
|
|
||||||
--- libsml-0.1.orig/examples/Makefile
|
|
||||||
+++ libsml-0.1/examples/Makefile
|
|
||||||
@@ -1,17 +1,17 @@
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
CFLAGS += -I../sml/include/ -g -Wall
|
|
||||||
OBJS = sml_server.o
|
|
||||||
+LIBSML = ../sml/lib/libsml.a
|
|
||||||
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
-LIBS = -L../sml/lib/ ../sml/lib/libsml.o -luuid
|
|
||||||
-endif
|
|
||||||
-ifeq ($(UNAME), Darwin)
|
|
||||||
-LIBS = -L../sml/lib/ ../sml/lib/libsml.o
|
|
||||||
+LIBS = -luuid
|
|
||||||
endif
|
|
||||||
|
|
||||||
+sml_server : $(OBJS) $(LIBSML)
|
|
||||||
+ $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(LIBSML) -o sml_server
|
|
||||||
|
|
||||||
-sml_server : $(OBJS)
|
|
||||||
- $(CC) $(CFLAGS) $(LIBS) -o sml_server $(OBJS)
|
|
||||||
+%.o : %.c
|
|
||||||
+ $(CC) $(CFLAGS) -c $^ -o $@
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
134
debian/patches/debian-changes-0.1-2~wip
vendored
134
debian/patches/debian-changes-0.1-2~wip
vendored
|
@ -1,134 +0,0 @@
|
||||||
Description: Upstream changes introduced in version 0.1-2~wip
|
|
||||||
This patch has been created by dpkg-source during the package build.
|
|
||||||
Here's the last changelog entry, hopefully it gives details on why
|
|
||||||
those changes were made:
|
|
||||||
.
|
|
||||||
libsml (0.1-2~wip) unstable; urgency=low
|
|
||||||
.
|
|
||||||
* Added information for pkg-config
|
|
||||||
* Eased dependency for libuuid from version 2.17 to 2.16
|
|
||||||
as there were no changes in the symbols
|
|
||||||
* Changed architecture for developement files to 'all'
|
|
||||||
.
|
|
||||||
The person named in the Author field signed this changelog entry.
|
|
||||||
Author: Steffen Vogel <info@steffenvogel.de>
|
|
||||||
|
|
||||||
---
|
|
||||||
The information above should follow the Patch Tagging Guidelines, please
|
|
||||||
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
|
||||||
are templates for supplementary fields that you might want to add:
|
|
||||||
|
|
||||||
Origin: <vendor|upstream|other>, <url of original patch>
|
|
||||||
Bug: <url in upstream bugtracker>
|
|
||||||
Bug-Debian: http://bugs.debian.org/<bugnumber>
|
|
||||||
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
|
|
||||||
Forwarded: <no|not-needed|url proving that it has been forwarded>
|
|
||||||
Reviewed-By: <name and email of someone who approved the patch>
|
|
||||||
Last-Update: <YYYY-MM-DD>
|
|
||||||
|
|
||||||
--- /dev/null
|
|
||||||
+++ libsml-0.1/sml.pc
|
|
||||||
@@ -0,0 +1,13 @@
|
|
||||||
+prefix=/usr
|
|
||||||
+exec_prefix=${prefix}
|
|
||||||
+libdir=${exec_prefix}/lib
|
|
||||||
+includedir=${prefix}/include
|
|
||||||
+
|
|
||||||
+Name: libSML
|
|
||||||
+Description: Library for the Smart Messaging Language (SML)
|
|
||||||
+Version: 0.1
|
|
||||||
+URL: http://github.com/dailab/libsml
|
|
||||||
+Requires: uuid >= 2.16
|
|
||||||
+Libs: -L${libdir} -lsml
|
|
||||||
+Libs.private: -luuid
|
|
||||||
+Cflags: -I${includedir}/sml
|
|
||||||
--- libsml-0.1.orig/test/Makefile
|
|
||||||
+++ libsml-0.1/test/Makefile
|
|
||||||
@@ -1,10 +1,11 @@
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
CFLAGS += -I../sml/include/ -Wall
|
|
||||||
+LIBSML = ../sml/lib/libsml.a
|
|
||||||
+LIBS = -luuid
|
|
||||||
+
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
LIBS = -luuid
|
|
||||||
endif
|
|
||||||
-LIBSML = ../sml/lib/libsml.a
|
|
||||||
-
|
|
||||||
|
|
||||||
UNITY = \
|
|
||||||
unity/unity.o \
|
|
||||||
@@ -30,22 +31,18 @@ test_run: libsml test
|
|
||||||
@./test
|
|
||||||
|
|
||||||
test : $(UNITY) $(OBJS) $(LIBSML)
|
|
||||||
- $(CC) $(CFLAGS) $(LIBS) $(LIBSML) $^ test_main.c -o test
|
|
||||||
+ $(CC) $(CFLAGS) $(LIBS) $^ test_main.c -o test
|
|
||||||
|
|
||||||
.PHONY: code
|
|
||||||
libsml :
|
|
||||||
@$(MAKE) -C ../sml
|
|
||||||
|
|
||||||
%.o : %.c
|
|
||||||
- $(CC) $(CFLAGS) $(LIBS) -c $^ -o $@
|
|
||||||
+ $(CC) $(CFLAGS) -c $^ -o $@
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean :
|
|
||||||
@rm -f unity/*.o
|
|
||||||
@rm -f src/*.o
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
+ @rm -f test
|
|
||||||
|
|
||||||
--- libsml-0.1.orig/sml/Makefile
|
|
||||||
+++ libsml-0.1/sml/Makefile
|
|
||||||
@@ -4,6 +4,10 @@ CFLAGS += -I./include/ -fPIC -g -Wall
|
|
||||||
# Available Flags:
|
|
||||||
# _NO_UUID_LIB - compile without uuid lib
|
|
||||||
|
|
||||||
+ifeq ($(UNAME), Linux)
|
|
||||||
+LIBS = -luuid
|
|
||||||
+endif
|
|
||||||
+
|
|
||||||
LIB_DIR=./lib
|
|
||||||
OBJ_LIB=$(LIB_DIR)/libsml.o
|
|
||||||
DYN_LIB=$(LIB_DIR)/libsml.so
|
|
||||||
@@ -45,7 +49,7 @@ libsml: $(ST_LIB) $(OBJ_LIB)
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(DYN_LIB): $(OBJS)
|
|
||||||
- $(LD) -shared -o $@ $^
|
|
||||||
+ $(LD) $(LIBS) -shared -o $@ $^
|
|
||||||
|
|
||||||
$(OBJ_LIB): $(OBJS)
|
|
||||||
$(LD) -r -o $@ $^
|
|
||||||
--- libsml-0.1.orig/examples/Makefile
|
|
||||||
+++ libsml-0.1/examples/Makefile
|
|
||||||
@@ -1,17 +1,17 @@
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
CFLAGS += -I../sml/include/ -g -Wall
|
|
||||||
OBJS = sml_server.o
|
|
||||||
+LIBSML = ../sml/lib/libsml.a
|
|
||||||
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
-LIBS = -L../sml/lib/ ../sml/lib/libsml.o -luuid
|
|
||||||
-endif
|
|
||||||
-ifeq ($(UNAME), Darwin)
|
|
||||||
-LIBS = -L../sml/lib/ ../sml/lib/libsml.o
|
|
||||||
+LIBS = -luuid
|
|
||||||
endif
|
|
||||||
|
|
||||||
+sml_server : $(OBJS) $(LIBSML)
|
|
||||||
+ $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(LIBSML) -o sml_server
|
|
||||||
|
|
||||||
-sml_server : $(OBJS)
|
|
||||||
- $(CC) $(CFLAGS) $(LIBS) -o sml_server $(OBJS)
|
|
||||||
+%.o : %.c
|
|
||||||
+ $(CC) $(CFLAGS) -c $^ -o $@
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
66
debian/patches/debian-changes-0.1-3~wip
vendored
66
debian/patches/debian-changes-0.1-3~wip
vendored
|
@ -1,66 +0,0 @@
|
||||||
Description: Upstream changes introduced in version 0.1-3~wip
|
|
||||||
This patch has been created by dpkg-source during the package build.
|
|
||||||
Here's the last changelog entry, hopefully it gives details on why
|
|
||||||
those changes were made:
|
|
||||||
.
|
|
||||||
libsml (0.1-3~wip) unstable; urgency=low
|
|
||||||
.
|
|
||||||
* fixed invalid destination for libs
|
|
||||||
* added SONAME to shared library
|
|
||||||
.
|
|
||||||
The person named in the Author field signed this changelog entry.
|
|
||||||
Author: Steffen Vogel <info@steffenvogel.de>
|
|
||||||
|
|
||||||
---
|
|
||||||
The information above should follow the Patch Tagging Guidelines, please
|
|
||||||
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
|
||||||
are templates for supplementary fields that you might want to add:
|
|
||||||
|
|
||||||
Origin: <vendor|upstream|other>, <url of original patch>
|
|
||||||
Bug: <url in upstream bugtracker>
|
|
||||||
Bug-Debian: http://bugs.debian.org/<bugnumber>
|
|
||||||
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
|
|
||||||
Forwarded: <no|not-needed|url proving that it has been forwarded>
|
|
||||||
Reviewed-By: <name and email of someone who approved the patch>
|
|
||||||
Last-Update: <YYYY-MM-DD>
|
|
||||||
|
|
||||||
--- libsml-0.1.orig/sml/Makefile
|
|
||||||
+++ libsml-0.1/sml/Makefile
|
|
||||||
@@ -5,13 +5,17 @@ CFLAGS += -I./include/ -fPIC -g -Wall
|
|
||||||
# _NO_UUID_LIB - compile without uuid lib
|
|
||||||
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
-LIBS = -luuid
|
|
||||||
+LIBS=-luuid
|
|
||||||
endif
|
|
||||||
|
|
||||||
+NAME=libsml
|
|
||||||
+SOVERSION=1
|
|
||||||
+SONAME=$(NAME).so.$(SOVERSION)
|
|
||||||
+
|
|
||||||
LIB_DIR=./lib
|
|
||||||
-OBJ_LIB=$(LIB_DIR)/libsml.o
|
|
||||||
-DYN_LIB=$(LIB_DIR)/libsml.so
|
|
||||||
-ST_LIB=$(LIB_DIR)/libsml.a
|
|
||||||
+OBJ_LIB=$(LIB_DIR)/$(NAME).o
|
|
||||||
+DYN_LIB=$(LIB_DIR)/$(SONAME)
|
|
||||||
+ST_LIB=$(LIB_DIR)/$(NAME).a
|
|
||||||
|
|
||||||
OBJS = \
|
|
||||||
src/sml_file.o \
|
|
||||||
@@ -49,7 +53,7 @@ libsml: $(ST_LIB) $(OBJ_LIB)
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(DYN_LIB): $(OBJS)
|
|
||||||
- $(LD) $(LIBS) -shared -o $@ $^
|
|
||||||
+ $(LD) $(LIBS) -shared -soname $(SONAME) -o $@ $^
|
|
||||||
|
|
||||||
$(OBJ_LIB): $(OBJS)
|
|
||||||
$(LD) -r -o $@ $^
|
|
||||||
@@ -60,5 +64,5 @@ $(ST_LIB): $(OBJS)
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
@rm -f src/*.o
|
|
||||||
- @rm -f $(LIB_DIR)/*.so $(LIB_DIR)/*.a $(LIB_DIR)/*.o
|
|
||||||
+ @rm -f $(DYN_LIB) $(OBJ_LIB) $(ST_LIB)
|
|
||||||
|
|
54
debian/patches/debian-changes-0.1-4~wip
vendored
54
debian/patches/debian-changes-0.1-4~wip
vendored
|
@ -1,54 +0,0 @@
|
||||||
Description: Upstream changes introduced in version 0.1-4~wip
|
|
||||||
This patch has been created by dpkg-source during the package build.
|
|
||||||
Here's the last changelog entry, hopefully it gives details on why
|
|
||||||
those changes were made:
|
|
||||||
.
|
|
||||||
libsml (0.1-4~wip) unstable; urgency=low
|
|
||||||
.
|
|
||||||
* Fixed bug in sml_message_body_free
|
|
||||||
.
|
|
||||||
The person named in the Author field signed this changelog entry.
|
|
||||||
Author: Steffen Vogel <info@steffenvogel.de>
|
|
||||||
|
|
||||||
---
|
|
||||||
The information above should follow the Patch Tagging Guidelines, please
|
|
||||||
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
|
||||||
are templates for supplementary fields that you might want to add:
|
|
||||||
|
|
||||||
Origin: <vendor|upstream|other>, <url of original patch>
|
|
||||||
Bug: <url in upstream bugtracker>
|
|
||||||
Bug-Debian: http://bugs.debian.org/<bugnumber>
|
|
||||||
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
|
|
||||||
Forwarded: <no|not-needed|url proving that it has been forwarded>
|
|
||||||
Reviewed-By: <name and email of someone who approved the patch>
|
|
||||||
Last-Update: <YYYY-MM-DD>
|
|
||||||
|
|
||||||
--- libsml-0.1.orig/sml/src/sml_message.c
|
|
||||||
+++ libsml-0.1/sml/src/sml_message.c
|
|
||||||
@@ -166,7 +166,7 @@ sml_message_body *sml_message_body_init(
|
|
||||||
|
|
||||||
void sml_message_body_write(sml_message_body *message_body, sml_buffer *buf) {
|
|
||||||
sml_buf_set_type_and_length(buf, SML_TYPE_LIST, 2);
|
|
||||||
- sml_u16_write(message_body->tag, buf);
|
|
||||||
+ sml_u16_write(message_body->tag, buf);
|
|
||||||
|
|
||||||
switch (*(message_body->tag)) {
|
|
||||||
case SML_MESSAGE_OPEN_REQUEST:
|
|
||||||
@@ -195,8 +195,6 @@ void sml_message_body_write(sml_message_
|
|
||||||
|
|
||||||
void sml_message_body_free(sml_message_body *message_body) {
|
|
||||||
if (message_body) {
|
|
||||||
- sml_number_free(message_body->tag);
|
|
||||||
-
|
|
||||||
switch (*(message_body->tag)) {
|
|
||||||
case SML_MESSAGE_OPEN_REQUEST:
|
|
||||||
sml_open_request_free((sml_open_request *) message_body->data);
|
|
||||||
@@ -224,6 +222,8 @@ void sml_message_body_free(sml_message_b
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ sml_number_free(message_body->tag);
|
|
||||||
+
|
|
||||||
free(message_body);
|
|
||||||
}
|
|
||||||
}
|
|
133
debian/patches/debian-changes-0.1-5~wip
vendored
133
debian/patches/debian-changes-0.1-5~wip
vendored
|
@ -1,133 +0,0 @@
|
||||||
Description: Upstream changes introduced in version 0.1-5~wip
|
|
||||||
This patch has been created by dpkg-source during the package build.
|
|
||||||
Here's the last changelog entry, hopefully it gives details on why
|
|
||||||
those changes were made:
|
|
||||||
.
|
|
||||||
libsml (0.1-5~wip) unstable; urgency=low
|
|
||||||
.
|
|
||||||
* Adapted sml_transport_ for vzlogger
|
|
||||||
.
|
|
||||||
The person named in the Author field signed this changelog entry.
|
|
||||||
Author: Steffen Vogel <info@steffenvogel.de>
|
|
||||||
|
|
||||||
---
|
|
||||||
The information above should follow the Patch Tagging Guidelines, please
|
|
||||||
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
|
||||||
are templates for supplementary fields that you might want to add:
|
|
||||||
|
|
||||||
Origin: <vendor|upstream|other>, <url of original patch>
|
|
||||||
Bug: <url in upstream bugtracker>
|
|
||||||
Bug-Debian: http://bugs.debian.org/<bugnumber>
|
|
||||||
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
|
|
||||||
Forwarded: <no|not-needed|url proving that it has been forwarded>
|
|
||||||
Reviewed-By: <name and email of someone who approved the patch>
|
|
||||||
Last-Update: <YYYY-MM-DD>
|
|
||||||
|
|
||||||
--- libsml-0.1.orig/sml/include/sml/sml_shared.h
|
|
||||||
+++ libsml-0.1/sml/include/sml/sml_shared.h
|
|
||||||
@@ -106,8 +106,8 @@ void sml_buf_update_bytes_read(sml_buffe
|
|
||||||
|
|
||||||
// Checks if the next field is a skipped optional field, updates the buffer accordingly
|
|
||||||
int sml_buf_optional_is_skipped(sml_buffer *buf);
|
|
||||||
-#define SML_SKIP_OPTIONAL (sml_buf_optional_is_skipped(buf)) ? 0 :
|
|
||||||
|
|
||||||
+// Prints arbitrarily byte string to stdout with printf
|
|
||||||
void hexdump(unsigned char *buffer, size_t buffer_len);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
--- libsml-0.1.orig/sml/include/sml/sml_transport.h
|
|
||||||
+++ libsml-0.1/sml/include/sml/sml_transport.h
|
|
||||||
@@ -26,12 +26,14 @@
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-// sml_transport_listen reads continously bytes from fd and scans
|
|
||||||
+// sml_transport_read reads continously bytes from fd and scans
|
|
||||||
// for the SML transport protocol escape sequences. If a SML file
|
|
||||||
-// is detected, the sml_transporter_receiver is called with the
|
|
||||||
-// complete bytes, including the escape sequences.
|
|
||||||
-// The buffer is free'd after the sml_transport_receiver comes
|
|
||||||
-// back.
|
|
||||||
+// is detected it will be copied into the buffer. The total amount of bytes read
|
|
||||||
+// will be returned. If the SML file exceeds the len of the buffer, -1 will be returned
|
|
||||||
+size_t sml_transport_read(int fd, unsigned char *buffer, size_t max_len);
|
|
||||||
+
|
|
||||||
+// sml_transport_listen is an endless loop which reads continously
|
|
||||||
+// via sml_transport_read and calls the sml_transporter_receiver
|
|
||||||
void sml_transport_listen(int fd, void (*sml_transport_receiver)(unsigned char *buffer, size_t buffer_len));
|
|
||||||
|
|
||||||
// sml_transport_writes adds the SML transport protocol escape
|
|
||||||
--- libsml-0.1.orig/sml/src/sml_list.c
|
|
||||||
+++ libsml-0.1/sml/src/sml_list.c
|
|
||||||
@@ -60,7 +60,7 @@ sml_list *sml_list_entry_parse(sml_buffe
|
|
||||||
l->status = sml_status_parse(buf);
|
|
||||||
if (sml_buf_has_errors(buf)) goto error;
|
|
||||||
|
|
||||||
- l->val_time = SML_SKIP_OPTIONAL sml_time_parse(buf);
|
|
||||||
+ l->val_time = sml_time_parse(buf);
|
|
||||||
if (sml_buf_has_errors(buf)) goto error;
|
|
||||||
|
|
||||||
l->unit = sml_u8_parse(buf);
|
|
||||||
--- libsml-0.1.orig/sml/src/sml_transport.c
|
|
||||||
+++ libsml-0.1/sml/src/sml_transport.c
|
|
||||||
@@ -29,17 +29,17 @@
|
|
||||||
|
|
||||||
#define MC_SML_BUFFER_LEN 8096
|
|
||||||
|
|
||||||
-void sml_transport_listen(int fd, void (*sml_transport_receiver)(unsigned char *buffer, size_t buffer_len)) {
|
|
||||||
+size_t sml_transport_read(int fd, unsigned char *buffer, size_t max_len) {
|
|
||||||
|
|
||||||
fd_set readfds;
|
|
||||||
FD_ZERO(&readfds);
|
|
||||||
FD_SET(fd, &readfds);
|
|
||||||
|
|
||||||
unsigned char byte;
|
|
||||||
- unsigned char buf[MC_SML_BUFFER_LEN];
|
|
||||||
- int esc = 0, start = 0, i, end = 0, r;
|
|
||||||
+ unsigned char buf[max_len];
|
|
||||||
+ int esc = 0, start = 0, i = 0, end = 0, r;
|
|
||||||
|
|
||||||
- for (i = 0; i < MC_SML_BUFFER_LEN;) {
|
|
||||||
+ while (i < max_len) {
|
|
||||||
select(fd + 1, &readfds, 0, 0, 0);
|
|
||||||
if (FD_ISSET(fd, &readfds)) {
|
|
||||||
|
|
||||||
@@ -79,13 +79,8 @@ void sml_transport_listen(int fd, void (
|
|
||||||
if (end) {
|
|
||||||
end++;
|
|
||||||
if (end == 5) {
|
|
||||||
- char *sml_file = (char *) malloc(i);
|
|
||||||
- memcpy(sml_file, &(buf[0]), i);
|
|
||||||
- sml_transport_receiver((unsigned char *)(sml_file), i);
|
|
||||||
- free(sml_file);
|
|
||||||
- i = -1;
|
|
||||||
- esc = 0;
|
|
||||||
- end = 0;
|
|
||||||
+ memcpy(buffer, &(buf[0]), i);
|
|
||||||
+ return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
@@ -111,7 +106,21 @@ void sml_transport_listen(int fd, void (
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- printf("error: no end sequence found, buffer full.");
|
|
||||||
+
|
|
||||||
+ return -1;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void sml_transport_listen(int fd, void (*sml_transport_receiver)(unsigned char *buffer, size_t buffer_len)) {
|
|
||||||
+ unsigned char buffer[MC_SML_BUFFER_LEN];
|
|
||||||
+ size_t bytes;
|
|
||||||
+
|
|
||||||
+ while (1) {
|
|
||||||
+ bytes = sml_transport_read(fd, buffer, MC_SML_BUFFER_LEN);
|
|
||||||
+
|
|
||||||
+ if (bytes > 0) {
|
|
||||||
+ sml_transport_receiver(buffer, bytes);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
int sml_transport_write(int fd, sml_file *file) {
|
|
4
debian/patches/series
vendored
4
debian/patches/series
vendored
|
@ -1,4 +0,0 @@
|
||||||
debian-changes-0.1-2~wip
|
|
||||||
debian-changes-0.1-3~wip
|
|
||||||
debian-changes-0.1-4~wip
|
|
||||||
debian-changes-0.1-5~wip
|
|
25
debian/rules
vendored
25
debian/rules
vendored
|
@ -10,4 +10,27 @@
|
||||||
#export DH_VERBOSE=1
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@
|
||||||
|
|
||||||
|
# Skip some commands
|
||||||
|
override_dh_pysupport:
|
||||||
|
override_dh_installwm:
|
||||||
|
override_dh_installxfonts:
|
||||||
|
override_dh_installgsettings:
|
||||||
|
override_dh_installmenu:
|
||||||
|
override_dh_icons:
|
||||||
|
override_dh_gconf:
|
||||||
|
override_dh_installcron:
|
||||||
|
override_dh_installdebconf:
|
||||||
|
override_dh_installemacsen:
|
||||||
|
override_dh_installifupdown:
|
||||||
|
override_dh_installinit:
|
||||||
|
override_dh_installmime:
|
||||||
|
override_dh_installmodules:
|
||||||
|
override_dh_installlogcheck:
|
||||||
|
override_dh_installlogrotate:
|
||||||
|
override_dh_installpam:
|
||||||
|
override_dh_installppp:
|
||||||
|
override_dh_installudev:
|
||||||
|
override_dh_perl:
|
||||||
|
|
||||||
|
|
1
debian/source/options
vendored
Normal file
1
debian/source/options
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
single-debian-patch
|
1
debian/substvars
vendored
1
debian/substvars
vendored
|
@ -1 +0,0 @@
|
||||||
shlibs:Depends=libuuid1 (>= 2.16)
|
|
Loading…
Add table
Reference in a new issue