debian/rules
author Ryan C. Gordon <icculus@icculus.org>
Fri, 09 Aug 2002 19:45:54 +0000
changeset 450 b60e00958aad
parent 443 984ac3af2b0a
child 528 4d84e1994edb
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.
443
984ac3af2b0a Merged updated Debian build-control files with the CVS tree.
vogon
parents: 437
diff changeset
    36
	./bootstrap
437
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    37
	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
    38
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    39
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    40
build: build-stamp
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    41
build-stamp:  config.status
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    42
	dh_testdir
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    43
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    44
	# Add here commands to compile the package.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    45
	$(MAKE)
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    46
	doxygen
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    47
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    48
	touch build-stamp
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    49
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    50
clean:
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    51
	dh_testdir
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    52
	dh_testroot
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    53
	rm -f build-stamp 
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    54
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    55
	# Add here commands to clean up after the build process.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    56
	-$(MAKE) distclean
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    57
	-test -r /usr/share/misc/config.sub && \
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    58
	  cp -f /usr/share/misc/config.sub config.sub
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    59
	-test -r /usr/share/misc/config.guess && \
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    60
	  cp -f /usr/share/misc/config.guess config.guess
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
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    63
	dh_clean
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    64
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    65
install: build
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    66
	dh_testdir
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    67
	dh_testroot
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    68
	dh_clean -k
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    69
	dh_installdirs
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    70
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    71
	# Add here commands to install the package into debian/tmp
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    72
	$(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    73
	install -d $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/latex
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    74
	install -d $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/html
443
984ac3af2b0a Merged updated Debian build-control files with the CVS tree.
vogon
parents: 437
diff changeset
    75
	install -d $(CURDIR)/debian/tmp/usr/share/man/man3
984ac3af2b0a Merged updated Debian build-control files with the CVS tree.
vogon
parents: 437
diff changeset
    76
	# install -D docs/README $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/README
437
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    77
	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
    78
	install -D docs/html/* $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/html
443
984ac3af2b0a Merged updated Debian build-control files with the CVS tree.
vogon
parents: 437
diff changeset
    79
	install -D docs/man/man3/* $(CURDIR)/debian/tmp/usr/share/man/man3
437
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    80
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    81
# Build architecture-independent files here.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    82
binary-indep: build install
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    83
# We have nothing to do by default.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    84
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    85
# Build architecture-dependent files here.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    86
binary-arch: build install
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    87
	dh_testdir
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    88
	dh_testroot
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    89
	dh_movefiles
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    90
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    91
#	dh_installdebconf	
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    92
	dh_installdocs
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    93
	dh_installexamples
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    94
	dh_installmenu
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    95
#	dh_installlogrotate
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    96
#	dh_installemacsen
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    97
#	dh_installpam
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    98
#	dh_installmime
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    99
#	dh_installinit
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   100
	dh_installcron
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   101
	dh_installman
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   102
	dh_installinfo
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   103
#	dh_undocumented
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   104
	dh_installchangelogs CHANGELOG
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   105
	dh_link
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   106
	dh_strip
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   107
	dh_compress
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   108
	dh_fixperms
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   109
	dh_makeshlibs
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   110
	dh_installdeb
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   111
#	dh_perl
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   112
	dh_shlibdeps
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   113
	dh_gencontrol
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   114
	dh_md5sums
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   115
	dh_builddeb
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   116
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   117
binary: binary-indep binary-arch
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   118
.PHONY: build clean binary-indep binary-arch binary install