Thread: [Mlt-devel] Patch: DESTDIR for Makefiles
Brought to you by:
ddennedy,
lilo_booter
From: Anthony G. <gr...@re...> - 2005-10-23 04:01:25
|
Hello. This patch really simplifies the creation of mlt RPMs. I submitted an older version about a year ago. This updates it to the latest cvs sources. Please consider applying it. Would you also accept a patch to move the modules from /usr/share/mlt to /usr/lib/mlt? I think this would be more appropriate. Thank you! AG diff -ru ../mlt/Makefile ./Makefile --- ../mlt/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -24,16 +24,18 @@ rm config.mak; install: - install -d "$(prefix)/bin" - install -d "$(prefix)/include" - install -d "$(prefix)/lib" - install -d "$(prefix)/lib/pkgconfig" - install -d "$(prefix)/share/mlt/modules" + install -d "$(DESTDIR)$(prefix)/bin" + install -d "$(DESTDIR)$(prefix)/include" + install -d "$(DESTDIR)$(prefix)/lib" + install -d "$(DESTDIR)$(prefix)/lib/pkgconfig" + install -d "$(DESTDIR)$(prefix)/share/mlt/modules" install -c -m 755 mlt-config "$(bindir)" - install -c -m 644 *.pc "$(prefix)/lib/pkgconfig" - install -m 644 packages.dat "$(prefix)/share/mlt/" + install -c -m 644 *.pc "$(DESTDIR)$(prefix)/lib/pkgconfig" + install -m 644 packages.dat "$(DESTDIR)$(prefix)/share/mlt/" list='$(SUBDIRS)'; \ for subdir in $$list; do \ - $(MAKE) -C $$subdir $@ || exit 1; \ + $(MAKE) DESTDIR=$(DESTDIR) -C $$subdir $@ || exit 1; \ done; \ - /sbin/ldconfig || true + if test -z "$(DESTDIR)"; then \ + /sbin/ldconfig || true; \ + fi diff -ru ../mlt/src/albino/Makefile ./src/albino/Makefile --- ../mlt/src/albino/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/albino/Makefile 2005-10-22 20:32:58.000000000 -0700 @@ -25,8 +25,8 @@ rm -f $(OBJS) $(TARGET) install: all - install -d "$(bindir)" - install -c -s -m 755 $(TARGET) "$(bindir)" + install -d "$(DESTDIR)$(bindir)" + install -c -s -m 755 $(TARGET) "$(DESTDIR)$(bindir)" ifneq ($(wildcard .depend),) include .depend Only in ./src/albino: Makefile.~1.11.~ diff -ru ../mlt/src/framework/Makefile ./src/framework/Makefile --- ../mlt/src/framework/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/framework/Makefile 2005-10-22 20:26:58.000000000 -0700 @@ -67,9 +67,9 @@ rm -f $(OBJS) $(TARGET) install: - install -m 755 $(TARGET) $(prefix)/lib/libmlt$(LIBSUF) - install -d "$(prefix)/include/mlt/framework" - install -m 644 $(INCS) "$(prefix)/include/mlt/framework" + install -m 755 $(TARGET) $(DESTDIR)$(prefix)/lib/libmlt$(LIBSUF) + install -d "$(DESTDIR)$(prefix)/include/mlt/framework" + install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/framework" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/humperdink/Makefile ./src/humperdink/Makefile --- ../mlt/src/humperdink/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/humperdink/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -27,8 +27,8 @@ rm -f $(OBJS) $(TARGET) install: all - install -d "$(bindir)" - install -c -s -m 755 $(TARGET) "$(bindir)" + install -d "$(DESTDIR)$(bindir)" + install -c -s -m 755 $(TARGET) "$(DESTDIR)$(bindir)" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/inigo/Makefile ./src/inigo/Makefile --- ../mlt/src/inigo/Makefile 2005-10-22 20:25:48.000000000 -0700 +++ ./src/inigo/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -26,8 +26,8 @@ rm -f $(OBJS) $(TARGET) install: all - install -d "$(bindir)" - install -c -s -m 755 $(TARGET) "$(bindir)" + install -d "$(DESTDIR)$(bindir)" + install -c -s -m 755 $(TARGET) "$(DESTDIR)$(bindir)" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/miracle/Makefile ./src/miracle/Makefile --- ../mlt/src/miracle/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/miracle/Makefile 2005-10-22 20:27:54.000000000 -0700 @@ -42,11 +42,11 @@ rm -f $(OBJS) $(TARGET) libmiracle$(LIBSUF) install: all - install -d "$(bindir)" - install -c -s -m 755 $(TARGET) "$(bindir)" - install -m 755 libmiracle$(LIBSUF) $(prefix)/lib/libmiracle$(LIBSUF) - mkdir -p "$(prefix)/include/mlt/miracle" - install -m 644 $(INCS) "$(prefix)/include/mlt/miracle" + install -d "$(DESTDIR)$(bindir)" + install -c -s -m 755 $(TARGET) "$(DESTDIR)$(bindir)" + install -m 755 libmiracle$(LIBSUF) $(DESTDIR)$(prefix)/lib/libmiracle$(LIBSUF) + mkdir -p "$(DESTDIR)$(prefix)/include/mlt/miracle" + install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/miracle" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/modules/avformat/Makefile ./src/modules/avformat/Makefile --- ../mlt/src/modules/avformat/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/avformat/Makefile 2005-10-22 20:28:32.000000000 -0700 @@ -45,11 +45,11 @@ rm -f ../../framework/libavcodec$(AVFORMAT_SUFFIX)$(LIBSUF) ../../framework/libavformat$(AVFORMAT_SUFFIX)$(LIBSUF) ../../framework/libavutil$(AVFORMAT_SUFFIX)$(LIBSUF) $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" if [ $(LOCAL_FFMPEG) ] ; then \ - install -m 755 ../../framework/libavcodec$(AVFORMAT_SUFFIX)$(LIBSUF) "$(prefix)/lib" ; \ - install -m 755 ../../framework/libavformat$(AVFORMAT_SUFFIX)$(LIBSUF) "$(prefix)/lib" ; \ - install -m 755 ../../framework/libavutil$(AVFORMAT_SUFFIX)$(LIBSUF) "$(prefix)/lib" ; \ + install -m 755 ../../framework/libavcodec$(AVFORMAT_SUFFIX)$(LIBSUF) "$(DESTDIR)$(prefix)/lib" ; \ + install -m 755 ../../framework/libavformat$(AVFORMAT_SUFFIX)$(LIBSUF) "$(DESTDIR)$(prefix)/lib" ; \ + install -m 755 ../../framework/libavutil$(AVFORMAT_SUFFIX)$(LIBSUF) "$(DESTDIR)$(prefix)/lib" ; \ fi ifneq ($(wildcard .depend),) diff -ru ../mlt/src/modules/core/Makefile ./src/modules/core/Makefile --- ../mlt/src/modules/core/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/core/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -52,8 +52,8 @@ rm -f $(OBJS) $(ASM_OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" - install -m 644 ../data_fx.properties "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" + install -m 644 ../data_fx.properties "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/modules/dv/Makefile ./src/modules/dv/Makefile --- ../mlt/src/modules/dv/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/dv/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -29,7 +29,7 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/modules/feeds/Makefile ./src/modules/feeds/Makefile --- ../mlt/src/modules/feeds/Makefile 2005-10-22 20:25:48.000000000 -0700 +++ ./src/modules/feeds/Makefile 2005-10-22 20:32:14.000000000 -0700 @@ -9,7 +9,7 @@ clean: install: all - install -d $(prefix)/share/mlt/modules/feeds/PAL - install -d $(prefix)/share/mlt/modules/feeds/NTSC - install -m 644 PAL/*.* $(prefix)/share/mlt/modules/feeds/PAL - install -m 644 NTSC/*.* $(prefix)/share/mlt/modules/feeds/NTSC + install -d $(DESTDIR)$(prefix)/share/mlt/modules/feeds/PAL + install -d $(DESTDIR)$(prefix)/share/mlt/modules/feeds/NTSC + install -m 644 PAL/*.* $(DESTDIR)$(prefix)/share/mlt/modules/feeds/PAL + install -m 644 NTSC/*.* $(DESTDIR)$(prefix)/share/mlt/modules/feeds/NTSC Only in ./src/modules/feeds: Makefile.~1.2.~ diff -ru ../mlt/src/modules/fezzik/Makefile ./src/modules/fezzik/Makefile --- ../mlt/src/modules/fezzik/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/fezzik/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -27,9 +27,9 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" - install -m 644 ../fezzik.dict "$(prefix)/share/mlt/modules" - install -m 644 ../fezzik.ini "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" + install -m 644 ../fezzik.dict "$(DESTDIR)$(prefix)/share/mlt/modules" + install -m 644 ../fezzik.ini "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/modules/gtk2/Makefile ./src/modules/gtk2/Makefile --- ../mlt/src/modules/gtk2/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/gtk2/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -53,7 +53,7 @@ rm -f $(OBJS) $(ASM_OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/modules/inigo/Makefile ./src/modules/inigo/Makefile --- ../mlt/src/modules/inigo/Makefile 2005-10-22 20:25:48.000000000 -0700 +++ ./src/modules/inigo/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -26,7 +26,7 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/modules/jackrack/Makefile ./src/modules/jackrack/Makefile --- ../mlt/src/modules/jackrack/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/jackrack/Makefile 2005-10-22 20:32:42.000000000 -0700 @@ -40,7 +40,7 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend Only in ./src/modules/jackrack: Makefile.~1.3.~ diff -ru ../mlt/src/modules/kino/Makefile ./src/modules/kino/Makefile --- ../mlt/src/modules/kino/Makefile 2005-10-22 20:25:48.000000000 -0700 +++ ./src/modules/kino/Makefile 2005-10-22 20:32:03.000000000 -0700 @@ -38,7 +38,7 @@ rm -f $(OBJS) $(TARGET) $(CPPOBJS) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend Only in ./src/modules/kino: Makefile.~1.4.~ diff -ru ../mlt/src/modules/lumas/Makefile ./src/modules/lumas/Makefile --- ../mlt/src/modules/lumas/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/lumas/Makefile 2005-10-22 20:32:36.000000000 -0700 @@ -17,7 +17,7 @@ rm -f luma install: all - install -d $(prefix)/share/mlt/modules/lumas/PAL - install -d $(prefix)/share/mlt/modules/lumas/NTSC - install -m 644 PAL/* $(prefix)/share/mlt/modules/lumas/PAL - install -m 644 NTSC/* $(prefix)/share/mlt/modules/lumas/NTSC + install -d $(DESTDIR)$(prefix)/share/mlt/modules/lumas/PAL + install -d $(DESTDIR)$(prefix)/share/mlt/modules/lumas/NTSC + install -m 644 PAL/* $(DESTDIR)$(prefix)/share/mlt/modules/lumas/PAL + install -m 644 NTSC/* $(DESTDIR)$(prefix)/share/mlt/modules/lumas/NTSC Only in ./src/modules/lumas: Makefile.~1.2.~ diff -ru ../mlt/src/modules/Makefile ./src/modules/Makefile --- ../mlt/src/modules/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -20,11 +20,11 @@ done install: - install -m 644 producers.dat filters.dat transitions.dat consumers.dat "$(prefix)/share/mlt/modules" + install -m 644 producers.dat filters.dat transitions.dat consumers.dat "$(DESTDIR)$(prefix)/share/mlt/modules" list='$(SUBDIRS)'; \ for subdir in $$list; do \ if [ -f $$subdir/Makefile -a ! -f disable-$$subdir ] ; \ - then $(MAKE) -C $$subdir $@ || exit 1; \ + then $(MAKE) DESTDIR=$(DESTDIR) -C $$subdir $@ || exit 1; \ fi \ done diff -ru ../mlt/src/modules/motion_est/Makefile ./src/modules/motion_est/Makefile --- ../mlt/src/modules/motion_est/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/motion_est/Makefile 2005-10-22 20:32:49.000000000 -0700 @@ -32,7 +32,7 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" test: $(TARGET) ~/mlt-devel/mlt/src/inigo/inigo -filter motion_est -filter vismv -filter benchmark -consumer sdl rescale=none real_time=0 audio_off=1 silent=1 /media/cdrecorder/BBC.The.Private.Life.Of.Plants.Pt5.Living.Together.DivX505.AC3.www.MVGroup.org.uk.avi in=50000 Only in ./src/modules/motion_est: Makefile.~1.2.~ diff -ru ../mlt/src/modules/normalize/Makefile ./src/modules/normalize/Makefile --- ../mlt/src/modules/normalize/Makefile 2005-10-22 20:25:48.000000000 -0700 +++ ./src/modules/normalize/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -26,7 +26,7 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/modules/plus/Makefile ./src/modules/plus/Makefile --- ../mlt/src/modules/plus/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/plus/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -30,7 +30,7 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/modules/resample/Makefile ./src/modules/resample/Makefile --- ../mlt/src/modules/resample/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/resample/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -28,7 +28,7 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/modules/sdl/Makefile ./src/modules/sdl/Makefile --- ../mlt/src/modules/sdl/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/sdl/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -43,7 +43,7 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/modules/sox/Makefile ./src/modules/sox/Makefile --- ../mlt/src/modules/sox/Makefile 2005-10-22 20:25:48.000000000 -0700 +++ ./src/modules/sox/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -26,7 +26,7 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/modules/valerie/Makefile ./src/modules/valerie/Makefile --- ../mlt/src/modules/valerie/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/valerie/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -26,7 +26,7 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/modules/vmfx/Makefile ./src/modules/vmfx/Makefile --- ../mlt/src/modules/vmfx/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/vmfx/Makefile 2005-10-22 20:32:24.000000000 -0700 @@ -29,7 +29,7 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend Only in ./src/modules/vmfx: Makefile.~1.3.~ diff -ru ../mlt/src/modules/vorbis/Makefile ./src/modules/vorbis/Makefile --- ../mlt/src/modules/vorbis/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/vorbis/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -28,7 +28,7 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/modules/westley/Makefile ./src/modules/westley/Makefile --- ../mlt/src/modules/westley/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/modules/westley/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -29,8 +29,8 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" - install -m 644 westley.dtd "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" + install -m 644 westley.dtd "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/modules/xine/Makefile ./src/modules/xine/Makefile --- ../mlt/src/modules/xine/Makefile 2005-10-22 20:25:48.000000000 -0700 +++ ./src/modules/xine/Makefile 2005-10-22 20:26:09.000000000 -0700 @@ -28,7 +28,7 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff -ru ../mlt/src/valerie/Makefile ./src/valerie/Makefile --- ../mlt/src/valerie/Makefile 2005-10-22 20:25:47.000000000 -0700 +++ ./src/valerie/Makefile 2005-10-22 20:28:59.000000000 -0700 @@ -42,9 +42,9 @@ rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) $(prefix)/lib/libvalerie$(LIBSUF) - mkdir -p "$(prefix)/include/mlt/valerie" - install -m 644 $(INCS) "$(prefix)/include/mlt/valerie" + install -m 755 $(TARGET) $(DESTDIR)$(prefix)/lib/libvalerie$(LIBSUF) + mkdir -p "$(DESTDIR)$(prefix)/include/mlt/valerie" + install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/valerie" ifneq ($(wildcard .depend),) include .depend |
From: Dan D. <da...@de...> - 2005-10-23 19:02:35
|
On Saturday 22 October 2005 09:01 pm, Anthony Green wrote: > Would you also accept a patch to move the modules from /usr/share/mlt > to /usr/lib/mlt? I think this would be more appropriate. I agree, but this is Charlie's call. |