misc/libtremor/tremor/debian/rules
branchphysfslayer
changeset 7928 88fde28bbda6
parent 7778 3331b30e4ef1
parent 7926 550083f61a0e
child 7931 5a27ed7f17b7
equal deleted inserted replaced
7778:3331b30e4ef1 7928:88fde28bbda6
     1 #!/usr/bin/make -f
       
     2 # Sample debian/rules that uses debhelper.
       
     3 # GNU copyright 1997 to 1999 by Joey Hess.
       
     4 
       
     5 # Uncomment this to turn on verbose mode.
       
     6 #export DH_VERBOSE=1
       
     7 
       
     8 # This is the debhelper compatibility version to use.
       
     9 export DH_COMPAT=4
       
    10 
       
    11 # This has to be exported to make some magic below work.
       
    12 export DH_OPTIONS
       
    13 
       
    14 # These are used for cross-compiling and for saving the configure script
       
    15 # from having to guess our platform (since we know it already)
       
    16 DEB_HOST_GNU_TYPE	?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
       
    17 DEB_BUILD_GNU_TYPE	?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
       
    18 
       
    19 objdir = $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)
       
    20 
       
    21 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
       
    22 	CFLAGS += -g
       
    23 endif
       
    24 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
       
    25 	INSTALL_PROGRAM += -s
       
    26 endif
       
    27 
       
    28 configure: configure-stamp
       
    29 configure-stamp:
       
    30 	dh_testdir
       
    31 
       
    32 	# make build directory
       
    33 	mkdir $(objdir)
       
    34 
       
    35 	# run configure with build tree $(objdir)
       
    36 	# change ../configure to ../autogen.sh for CVS build
       
    37 	cd $(objdir) && \
       
    38 	../configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
       
    39 	--prefix=/usr
       
    40 
       
    41 	touch configure-stamp
       
    42 
       
    43 build: build-stamp
       
    44 build-stamp: configure-stamp 
       
    45 	dh_testdir
       
    46 
       
    47 	cd $(objdir) && \
       
    48 	$(MAKE)
       
    49 
       
    50 	touch build-stamp
       
    51 
       
    52 autotools:
       
    53 	OLDDATESUB=`./config.sub -t | tr -d -` ;\
       
    54 	OLDDATEGUESS=`./config.guess -t | tr -d -` ;\
       
    55 	NEWDATESUB=`/usr/share/misc/config.sub -t | tr -d -` ;\
       
    56 	NEWDATEGUESS=`/usr/share/misc/config.guess -t | tr -d -` ;\
       
    57 	if [ $$OLDDATESUB -lt $$NEWDATESUB -o \
       
    58 	     $$OLDDATEGUESS -lt $$NEWDATEGUESS ]; then \
       
    59 	   dch -a -p "GNU config automated update: config.sub\
       
    60 	     ($$OLDDATESUB to $$NEWDATESUB), config.guess\
       
    61 	     ($$OLDDATEGUESS to $$NEWDATEGUESS)" ;\
       
    62 	   cp -f /usr/share/misc/config.sub config.sub ;\
       
    63 	   cp -f /usr/share/misc/config.guess config.guess ;\
       
    64 	   echo WARNING: GNU config scripts updated from master copies 1>&2 ;\
       
    65 	fi
       
    66 
       
    67 debian-clean:
       
    68 	dh_testdir
       
    69 	dh_testroot
       
    70 
       
    71 	dh_clean
       
    72 
       
    73 clean: autotools
       
    74 	dh_testdir
       
    75 	dh_testroot
       
    76 	rm -f build-stamp configure-stamp
       
    77 
       
    78 	# Remove build tree
       
    79 	rm -rf $(objdir)
       
    80 
       
    81 	# if Makefile exists run distclean
       
    82 	if test -f Makefile; then \
       
    83 		$(MAKE) distclean; \
       
    84 	fi
       
    85 
       
    86 	#if test -d CVS; then \
       
    87 		$(MAKE) cvs-clean ;\
       
    88 	fi
       
    89 
       
    90 	dh_clean
       
    91 
       
    92 install: DH_OPTIONS=
       
    93 install: build
       
    94 	dh_testdir
       
    95 	dh_testroot
       
    96 	dh_clean -k
       
    97 	dh_installdirs
       
    98 
       
    99 	cd $(objdir) && \
       
   100 	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
       
   101 
       
   102 	dh_install --list-missing
       
   103 
       
   104 # This single target is used to build all the packages, all at once, or
       
   105 # one at a time. So keep in mind: any options passed to commands here will
       
   106 # affect _all_ packages. Anything you want to only affect one package
       
   107 # should be put in another target, such as the install target.
       
   108 binary-common:
       
   109 	dh_testdir
       
   110 	dh_testroot
       
   111 #	dh_installxfonts
       
   112 	dh_installchangelogs
       
   113 	dh_installdocs
       
   114 	dh_installexamples
       
   115 #	dh_installmenu
       
   116 #	dh_installdebconf
       
   117 #	dh_installlogrotate
       
   118 #	dh_installemacsen
       
   119 #	dh_installpam
       
   120 #	dh_installmime
       
   121 #	dh_installinit
       
   122 #	dh_installcron
       
   123 #	dh_installinfo
       
   124 #	dh_undocumented
       
   125 	dh_installman
       
   126 	dh_strip
       
   127 	dh_link
       
   128 	dh_compress
       
   129 	dh_fixperms
       
   130 	dh_makeshlibs -V
       
   131 	dh_installdeb
       
   132 #	dh_perl
       
   133 	dh_shlibdeps
       
   134 	dh_gencontrol
       
   135 	dh_md5sums
       
   136 	dh_builddeb
       
   137 
       
   138 # Build architecture independant packages using the common target.
       
   139 binary-indep: build install
       
   140 #	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
       
   141 
       
   142 # Build architecture dependant packages using the common target.
       
   143 binary-arch: build install
       
   144 	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
       
   145 
       
   146 # Any other binary targets build just one binary package at a time.
       
   147 binary-%: build install
       
   148 	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
       
   149 
       
   150 binary: binary-indep binary-arch
       
   151 .PHONY: build clean binary-indep binary-arch binary install configure