summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/Makefile
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/Makefile
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/Makefile')
-rw-r--r--t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/Makefile24
1 files changed, 24 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