diff options
Diffstat (limited to 't/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp')
11 files changed, 101 insertions, 0 deletions
diff --git a/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/compat.in b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/control.in b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/control.in new file mode 100644 index 0000000..9ca1147 --- /dev/null +++ b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/control.in @@ -0,0 +1,27 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libfoo-1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libfoo-dev +Architecture: any +Section: libdevel +Depends: ${shlibs:Depends}, ${misc:Depends}, + libfoo-1 (= ${binary:Version}) +Description: [% $description %] - dev + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Dev package. diff --git a/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-1.install b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-1.install new file mode 100644 index 0000000..cb060ec --- /dev/null +++ b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-1.install @@ -0,0 +1,2 @@ +lib/libbar-1.so +usr/lib/libfoo-1.so diff --git a/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-1.symbols b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-1.symbols new file mode 100644 index 0000000..910a1e5 --- /dev/null +++ b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-1.symbols @@ -0,0 +1,7 @@ +libfoo-1.so libfoo-1 #MINVER# + e@Base 1.0 + energy@Base 0.9 + +libbar-1.so libfoo-1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-dev.install b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-dev.install new file mode 100644 index 0000000..ed7b146 --- /dev/null +++ b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-dev.install @@ -0,0 +1,3 @@ +usr/include +usr/lib/libbar.so +usr/lib/libfoo.so diff --git a/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/fill-values b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/fill-values new file mode 100644 index 0000000..5240e59 --- /dev/null +++ b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/fill-values @@ -0,0 +1,5 @@ +Testname: shared-libs-dev-symlink-fp +Skeleton: upload-non-native +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test against dev symlink fp diff --git a/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/orig/Makefile b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/orig/Makefile new file mode 100644 index 0000000..decdff1 --- /dev/null +++ b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/orig/Makefile @@ -0,0 +1,27 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAME:= libfoo-1.so +LSONAME:= libbar-1.so +devsymlink=$(shell echo $(1) | perl -pe 's:-[\d\.]*\.so$$:\.so:') +LIBFILES:=$(SONAME) $(LSONAME) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$@ $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/lib + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0755 -d $(DESTDIR)/usr/include + install -m 0644 $(LSONAME) $(DESTDIR)/lib + install -m 0644 $(SONAME) $(DESTDIR)/usr/lib + ln -s /lib/$(LSONAME) $(DESTDIR)/usr/lib/$(call devsymlink,$(LSONAME)) + ln -s $(SONAME) $(DESTDIR)/usr/lib/$(call devsymlink,$(SONAME)) + install -m 0644 code.h $(DESTDIR)/usr/include + +.PHONY: install clean diff --git a/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/orig/code.c b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/orig/code.c new file mode 100644 index 0000000..9a88735 --- /dev/null +++ b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/orig/code.c @@ -0,0 +1,16 @@ +#include <stdlib.h> +#include <math.h> +#include "code.h" + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} + +double energy(double mass){ + return pow(10.0, 8.0) * pow(3.0, 2.0) * mass; +} + diff --git a/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/orig/code.h b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/orig/code.h new file mode 100644 index 0000000..570beae --- /dev/null +++ b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/build-spec/orig/code.h @@ -0,0 +1,8 @@ +#ifndef CODE_H_ +#define CODE_H_ + +double e(void (*f)(char *)); + +double energy(double mass); + +#endif diff --git a/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/eval/desc b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/eval/desc new file mode 100644 index 0000000..4cc6818 --- /dev/null +++ b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/eval/desc @@ -0,0 +1,4 @@ +Testname: shared-libs-dev-symlink-fp +Test-Against: + lacks-unversioned-link-to-shared-library +Check: libraries/shared/links diff --git a/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/eval/hints b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/libraries/shared/links/shared-libs-dev-symlink-fp/eval/hints @@ -0,0 +1 @@ + |