debian/rules
author Ryan C. Gordon <icculus@icculus.org>
Tue, 30 Jul 2002 05:20:00 +0000
changeset 437 2dff6a7d42b4
child 443 984ac3af2b0a
permissions -rwxr-xr-x
Initial add.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
437
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
#!/usr/bin/make -f
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
# Sample debian/rules that uses debhelper.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
# GNU copyright 1997 to 1999 by Joey Hess.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
# Uncomment this to turn on verbose mode.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
#export DH_VERBOSE=1
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
# This is the debhelper compatibility version to use.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9
export DH_COMPAT=3
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    10
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
# These are used for cross-compiling and for saving the configure script
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    12
# from having to guess our platform (since we know it already)
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    13
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    14
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    15
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    16
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    17
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    18
	CFLAGS += -g
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19
endif
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    20
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    21
	INSTALL_PROGRAM += -s
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    22
endif
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    23
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    24
# shared library versions, option 1
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    25
version=0.1.7
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    26
major=0
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    27
# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    28
#version=`ls src/.libs/lib*.so.* | \
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    29
# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    30
#major=`ls src/.libs/lib*.so.* | \
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    31
# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    32
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    33
config.status: configure
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    34
	dh_testdir
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    35
	# Add here commands to configure the package.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    36
	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    37
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    38
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    39
build: build-stamp
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    40
build-stamp:  config.status
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    41
	dh_testdir
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    42
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    43
	# Add here commands to compile the package.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    44
	$(MAKE)
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    45
	doxygen
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    46
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    47
	touch build-stamp
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    48
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    49
clean:
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    50
	dh_testdir
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    51
	dh_testroot
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    52
	rm -f build-stamp 
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    53
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    54
	# Add here commands to clean up after the build process.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    55
	-$(MAKE) distclean
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    56
	-test -r /usr/share/misc/config.sub && \
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    57
	  cp -f /usr/share/misc/config.sub config.sub
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    58
	-test -r /usr/share/misc/config.guess && \
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    59
	  cp -f /usr/share/misc/config.guess config.guess
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    60
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    61
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    62
	dh_clean
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    63
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    64
install: build
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    65
	dh_testdir
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    66
	dh_testroot
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    67
	dh_clean -k
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    68
	dh_installdirs
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    69
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    70
	# Add here commands to install the package into debian/tmp
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    71
	$(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    72
	install -d $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/latex
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    73
	install -d $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/man/man3
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    74
	install -d $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/html
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    75
	install -D docs/README $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/README
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    76
	install -D docs/latex/* $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/latex
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    77
	install -D docs/html/* $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/html
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    78
	install -D docs/man/man3/* $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/man/man3
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    79
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    80
# Build architecture-independent files here.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    81
binary-indep: build install
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    82
# We have nothing to do by default.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    83
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    84
# Build architecture-dependent files here.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    85
binary-arch: build install
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    86
	dh_testdir
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    87
	dh_testroot
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    88
	dh_movefiles
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    89
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    90
#	dh_installdebconf	
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    91
	dh_installdocs
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    92
	dh_installexamples
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    93
	dh_installmenu
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    94
#	dh_installlogrotate
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    95
#	dh_installemacsen
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    96
#	dh_installpam
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    97
#	dh_installmime
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    98
#	dh_installinit
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    99
	dh_installcron
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   100
	dh_installman
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   101
	dh_installinfo
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   102
#	dh_undocumented
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   103
	dh_installchangelogs CHANGELOG
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   104
	dh_link
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   105
	dh_strip
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   106
	dh_compress
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   107
	dh_fixperms
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   108
	dh_makeshlibs
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   109
	dh_installdeb
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   110
#	dh_perl
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   111
	dh_shlibdeps
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   112
	dh_gencontrol
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   113
	dh_md5sums
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   114
	dh_builddeb
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   115
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   116
binary: binary-indep binary-arch
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   117
.PHONY: build clean binary-indep binary-arch binary install