summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
commit75808db17caf8b960b351e3408e74142f4c85aac (patch)
tree7989e9c09a4240248bf4658a22208a0a52d991c4 /t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig
parentInitial commit. (diff)
downloadlintian-75808db17caf8b960b351e3408e74142f4c85aac.tar.xz
lintian-75808db17caf8b960b351e3408e74142f4c85aac.zip
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig')
-rw-r--r--t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/Makefile24
-rw-r--r--t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/code.c15
2 files changed, 39 insertions, 0 deletions
diff --git a/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/Makefile
new file mode 100644
index 0000000..ff58c3a
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/Makefile
@@ -0,0 +1,24 @@
+CC=gcc
+CFLAGS+= -fPIC
+
+SONAMES:= libpublic.so.1
+LIBFILES:= $(patsubst %,%.0.1, $(SONAMES))
+LIBDIR := /usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+all: $(LIBFILES)
+
+$(LIBFILES): code.o
+ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc
+
+clean:
+ rm -f *.a *.o *.so*
+
+install: all
+ install -m 0755 -d $(DESTDIR)$(LIBDIR)
+ install -m 0644 *.so* $(DESTDIR)$(LIBDIR)
+ set -e ; for FILE in $(SONAMES) ; do \
+ ln -s $${FILE}.0.1 $(DESTDIR)$(LIBDIR)/$$FILE ; \
+ ln -s $${FILE}.0.1 $(DESTDIR)$(LIBDIR)/$$(echo $$FILE | perl -pe 's/\.so\K.*//') ; \
+ done
+
+.PHONY: install clean
diff --git a/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/code.c
new file mode 100644
index 0000000..0ed08e0
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/code.c
@@ -0,0 +1,15 @@
+#include <stdlib.h>
+#include <math.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;
+}
+