[DVDnav-discuss] [PATCH] pkgconfig support for libdvdread

Dominik 'Rathann' Mierzejewski dominik at greysector.net
Sun Jul 13 14:39:18 CEST 2008


Hi.

This adds pkgconfig .pc file generation to the build system.

Patch attached. OK to apply? Dan, could you add the corresponding autotools
part?

Regards,
R.

-- 
Fedora http://fedoraproject.org/wiki/User:Rathann
Livna http://rpm.livna.org | MPlayer http://mplayerhq.hu
"Faith manages."
        -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
-------------- next part --------------
diff -up libdvdread-4.1.3/Makefile.p libdvdread-4.1.3/Makefile
--- libdvdread-4.1.3/Makefile.p	2008-06-01 18:00:59.000000000 +0200
+++ libdvdread-4.1.3/Makefile	2008-07-13 13:48:09.000000000 +0200
@@ -50,7 +50,7 @@ BUILDDEPS = Makefile config.mak
 
 ifeq ($(BUILD_SHARED),yes)
 all:	$(SHLIB) $(DVDREAD_SHLIB) dvdread-config
-install: $(SHLIB) $(DVDREAD_SHLIB) install-shared install-dvdread-config
+install: $(SHLIB) $(DVDREAD_SHLIB) install-shared install-dvdread-config install-dvdread.pc
 endif
 
 ifeq ($(BUILD_STATIC),yes)
@@ -146,6 +146,22 @@ install-dvdread-config: dvdread-config
 	install -d $(DESTDIR)$(PREFIX)/bin
 	install -m 0755 $(.OBJDIR)/dvdread-config $(DESTDIR)$(PREFIX)/bin/dvdread-config
 
+dvdread.pc: $(.OBJDIR)
+	@echo 'prefix=/usr' > $(.OBJDIR)/dvdread.pc
+	@echo 'libdir=$(shlibdir)' >> $(.OBJDIR)/dvdread.pc
+	@echo 'includedir=/usr/include' >> $(.OBJDIR)/dvdread.pc
+	@echo >> $(.OBJDIR)/dvdread.pc
+	@echo 'Libs: -L$${libdir} -ldvdread' >> $(.OBJDIR)/dvdread.pc
+	@echo 'Cflags: -I$${includedir}' >> $(.OBJDIR)/dvdread.pc
+	@echo >> $(.OBJDIR)/dvdread.pc
+	@echo 'Name: dvdread' >> $(.OBJDIR)/dvdread.pc
+	@echo 'Description: Library for reading DVDs' >> $(.OBJDIR)/dvdread.pc
+	@echo 'Version: $(SHLIB_VERSION)' >> $(.OBJDIR)/dvdread.pc
+
+install-dvdread.pc: dvdread.pc
+	install -d $(DESTDIR)$(shlibdir)/pkgconfig
+	install -m 0644 $(.OBJDIR)/dvdread.pc $(DESTDIR)$(shlibdir)/pkgconfig/dvdread.pc
+
 vpath %.so ${.OBJDIR}
 vpath %.o ${.OBJDIR}
 vpath ${LIB} ${.OBJDIR}


More information about the DVDnav-discuss mailing list