Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

Unnamed
Thursday, July 20th, 2006 at 3:43:30pm MDT 

  1. #!/usr/bin/make -f
  2.  
  3. #export DH_VERBOSE=1
  4. export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  5. export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  6. export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
  7.  
  8. ifeq ($(DEB_HOST_ARCH),i386)
  9. confflags += --extra-cflags="-fomit-frame-pointer -DRUNTIME_CPUDETECT"
  10. else
  11. confflags += --extra-cflags="-DRUNTIME_CPUDETECT"
  12. endif
  13.  
  14. # FOR AUTOCONF 2.52 AND NEWER ONLY
  15. ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
  16.   confflags +=
  17. else
  18.   confflags +=
  19. endif
  20.  
  21.  
  22. confflags += --enable-gpl
  23. confflags += --enable-vorbis --enable-libogg --enable-theora --enable-a52 --enable-dts --enable-dc1394 --enable-libgsm
  24. confflags += --disable-debug --enable-shared --enable-dts --enable-pp --disable-mmx
  25.  
  26. ifneq (,$(findstring risky,$(DEB_BUILD_OPTIONS)))
  27. weak-build-deps += liblame-dev
  28. confflags += --enable-mp3lame
  29. weak-build-deps += libfaad2-dev
  30. confflags += --enable-faadbin --enable-faad
  31. weak-build-deps += libfaac-dev
  32. confflags += --enable-faac
  33. weak-build-deps += libxvidcore-dev
  34. confflags += --enable-xvid
  35. $(warning Make sure these packages are installed: $(weak-build-deps))
  36. endif
  37.  
  38. configure: configure-stamp
  39. configure-stamp:
  40.         dh_testdir
  41.         ./configure $(confflags) --prefix=/usr
  42.         touch configure-stamp
  43.  
  44. build: configure-stamp build-stamp
  45. build-stamp:
  46.         dh_testdir
  47.         cd doc && $(MAKE)
  48.  
  49.         cd libavutil && \
  50.           rm -f Makefile.pic && \
  51.           sed 's/^CFLAGS *=/&-fPIC -DPIC /' <Makefile >Makefile.pic && \
  52.           $(MAKE) -f Makefile.pic && \
  53.           mv libavutil.a libavutil_pic.a && \
  54.           $(MAKE) clean && \
  55.           rm -f Makefile.pic
  56.  
  57.         cd libavcodec && \
  58.           rm -f Makefile.pic && \
  59.           sed 's/^CFLAGS *=/&-fPIC -DPIC /' <Makefile >Makefile.pic && \
  60.           $(MAKE) -f Makefile.pic && \
  61.           mv libavcodec.a libavcodec_pic.a && \
  62.            && \
  63.           $(MAKE) clean && \
  64.           rm -f Makefile.pic
  65.  
  66.         cd libavformat && \
  67.           rm -f Makefile.pic && \
  68.           sed 's/^CFLAGS *=/&-fPIC -DPIC /' <Makefile >Makefile.pic && \
  69.           $(MAKE) -f Makefile.pic && \
  70.           mv libavformat.a libavformat_pic.a && \
  71.           $(MAKE) clean && \
  72.           rm -f Makefile.pic
  73.  
  74.         $(MAKE)
  75.  
  76. ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
  77.         -cd tests && $(MAKE)
  78. endif
  79.  
  80.         touch build-stamp
  81.  
  82. clean:
  83.         dh_testdir
  84.         dh_testroot
  85.         rm -f build-stamp configure-stamp
  86.         -cd doc && $(MAKE) clean
  87.         -cd tests && $(MAKE) clean
  88.         -$(MAKE) distclean
  89.         rm -f libavcodec/Makefile.pic libavformat/Makefile.pic config.log
  90.         rm -f libavutil/libavutil_pic.a
  91.         rm -f libavcodec/libavcodec_pic.a
  92.         rm -f libavcodec/libpostproc/libpostproc_pic.a
  93.         rm -f libavformat/libavformat_pic.a
  94.         rm -f libavcodec-uninstalled.pc libavcodec.pc
  95.         rm -f libavutil-uninstalled.pc libavutil.pc
  96.         rm -f libavformat-uninstalled.pc libavformat.pc
  97.         rm -f libpostproc-uninstalled.pc libpostproc.pc
  98.         dh_clean
  99.  
  100. install: build
  101.         dh_testdir
  102.         dh_testroot
  103.         dh_clean -k
  104.         dh_installdirs -ptmp usr/share/doc/ffmpeg/html etc usr/include/ffmpeg usr/lib usr/bin usr/share/man/man1 usr/include/postproc
  105.  
  106.         $(MAKE) install DESTDIR=`pwd`/debian/tmp/ mandir=`pwd`/debian/tmp/usr/share/man
  107.         $(MAKE) installlib DESTDIR=`pwd`/debian/tmp/
  108.         cp libavutil/libavutil_pic.a libavcodec/libavcodec_pic.a libavcodec/libpostproc/libpostproc_pic.a libavformat/libavformat_pic.a debian/tmp/usr/lib
  109.         cp libavcodec/libpostproc/libpostproc.a debian/tmp/usr/lib
  110.         cp libavcodec/libpostproc/postprocess.h debian/tmp/usr/include/postproc
  111.         cp libpostproc.pc debian/tmp/usr/lib/pkgconfig/
  112.  
  113.         cp doc/*.html debian/tmp/usr/share/doc/ffmpeg/html/
  114.         cp doc/ffserver.conf debian/tmp/etc/
  115.  
  116.         sed s/@VERSION@/`dpkg-parsechangelog | sed -ne 's/^Version: //p'`/ ffmpeg-config.in > debian/tmp/usr/bin/ffmpeg-config
  117.         chmod 644 debian/tmp/usr/bin/ffmpeg-config
  118.         cp ffmpeg-config.1 debian/tmp/usr/share/man/man1/ffmpeg-config.1
  119.  
  120.         dh_install --fail-missing --sourcedir=debian/tmp
  121.  
  122. # Build architecture-independent files here.
  123. binary-indep: build install
  124. # We have nothing to do by default.
  125.  
  126. # Build architecture-dependent files here.
  127. binary-arch: build install
  128. #       dh_testversion
  129.         dh_testdir
  130.         dh_testroot
  131. #       dh_installdebconf
  132.         dh_installdocs doc/ffmpeg_powerpc_performance_evaluation_howto.txt doc/optimization.txt
  133.         dh_installdocs -A CREDITS doc/TODO debian/patents.txt debian/README.Debian
  134.         dh_installexamples doc/ffserver.conf
  135.         dh_installmenu
  136. #       dh_installemacsen
  137. #       dh_installpam
  138. #       dh_installinit
  139.         dh_installcron
  140. #       dh_installmanpages
  141.         dh_installinfo
  142.         dh_installmime
  143. #       dh_undocumented
  144.         dh_installchangelogs Changelog
  145.         dh_link
  146.         dh_strip
  147.         dh_compress
  148.         dh_fixperms
  149. #       dh_makeshlibs
  150.         dh_installdeb
  151. #       dh_perl
  152.         dh_shlibdeps
  153.         dh_gencontrol
  154.         dh_md5sums
  155.         dh_builddeb
  156.  
  157. binary: binary-indep binary-arch
  158. .PHONY: build clean binary-indep binary-arch binary install configure

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right
fantasy-obligation