Commit ab9ba06d4deb5e50d8efb43c9b18f4c1e99626b3

Steffen Jaeckel 2022-03-22T13:49:02

fix `pkgconfig` creation in `makefile.shared` Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/makefile.shared b/makefile.shared
index 41a0cd2..4938da8 100644
--- a/makefile.shared
+++ b/makefile.shared
@@ -65,7 +65,8 @@ install: $(LIBNAME)
 	install -d $(DESTDIR)$(INCPATH)
 	$(LIBTOOL) --mode=install install -m 644 $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
 	install -m 644 $(HEADERS_PUB) $(DESTDIR)$(INCPATH)
-	sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION_PC),' libtommath.pc.in > libtommath.pc
+	sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION_PC),' -e 's,@CMAKE_INSTALL_LIBDIR@,lib,' \
+		-e 's,@CMAKE_INSTALL_INCLUDEDIR@/@PROJECT_NAME@,include/tommath,' libtommath.pc.in > libtommath.pc
 	install -d $(DESTDIR)$(LIBPATH)/pkgconfig
 	install -m 644 libtommath.pc $(DESTDIR)$(LIBPATH)/pkgconfig/