source: ProjectBuilder/projects/star/pbconf/1.6/star/deb/rules@ 2634

Last change on this file since 2634 was 2634, checked in by Bruno Cornec, 4 years ago

add conf to build star with project-builder.org

File size: 2.8 KB
Line 
1#!/usr/bin/make -f
2# -*- makefile -*-
3# Sample debian/rules that uses debhelper.
4# GNU copyright 1997 to 1999 by Joey Hess.
5#
6# $Id$
7#
8
9# Uncomment this to turn on verbose mode.
10#export DH_VERBOSE=1
11
12# Define package name variable for a one-stop change.
13PACKAGE_NAME = PBPKG
14
15# These are used for cross-compiling and for saving the configure script
16# from having to guess our platform (since we know it already)
17DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
18DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
19
20CFLAGS = -Wall -g
21
22ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
23 CFLAGS += -O0
24else
25 CFLAGS += -O2
26endif
27ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
28 INSTALL_PROGRAM += -s
29endif
30
31# Build both architecture dependent and independent
32build: build-arch
33
34# Build architecture dependent
35build-arch: build-arch-stamp
36
37build-arch-stamp:
38 dh_testdir
39 #for PLAT in amd64 aarch64; do for AFILE in gcc cc; do [ ! -e RULES/$(PLAT)-linux-$(AFILE).rul ] && ln -s i586-linux-$(AFILE).rul RULES/$(PLAT)-linux-$(AFILE).rul; done; done
40
41 # Compile the package.
42 make COPTX=-DTRY_EXT2_FS GMAKE_NOWARN=true MANDIR=man CFLAGS="-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fasynchronous-unwind-tables"
43 touch build-stamp
44
45# Clean up
46clean:
47 dh_testdir
48 dh_testroot
49 rm -f build-arch-stamp #CONFIGURE-STAMP#
50 # Clean temporary document directory
51 rm -rf debian/doc-temp
52 # Clean up.
53 -$(MAKE) distclean
54 rm -f config.log
55ifneq "$(wildcard /usr/share/misc/config.sub)" ""
56 cp -f /usr/share/misc/config.sub config.sub
57endif
58ifneq "$(wildcard /usr/share/misc/config.guess)" ""
59 cp -f /usr/share/misc/config.guess config.guess
60endif
61
62 dh_clean
63
64# Install architecture dependent and independent
65install: install-arch
66
67# Install architecture dependent
68install-arch: build-arch
69 dh_testdir
70 dh_testroot
71 dh_clean -k -s
72 dh_installdirs -s
73
74 # Install the package files into build directory:
75 dh_install -s
76 make GMAKE_NOWARN=true "INS_BASE=$(CURDIR)/debian/$(PACKAGE_NAME)/usr" "INS_RBASE=/$(CURDIR)/debian/$(PACKAGE_NAME)" MANDIR=man install
77 rm -rf $(CURDIR)/debian/$(PACKAGE_NAME)
78
79 #mkdir -p $(CURDIR)/debian/$(PACKAGE_NAME)/usr/bin
80 #mkdir -p $(CURDIR)/debian/$(PACKAGE_NAME)/usr/share/man/man1
81
82# Must not depend on anything. This is to be called by
83# binary-arch/binary-indep
84# in another 'make' thread.
85binary-common:
86 dh_testdir
87 dh_testroot
88 #dh_installchangelogs changelog
89 dh_installdocs
90 dh_installman
91 dh_link
92 dh_strip
93 dh_compress
94 dh_fixperms
95 dh_installdeb
96 dh_shlibdeps
97 dh_gencontrol
98 dh_md5sums
99 dh_builddeb
100
101# Build architecture dependant packages using the common target.
102binary-arch: build-arch install-arch
103 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
104
105# Build architecture depdendent and independent packages
106binary: binary-arch
107.PHONY: clean binary
108
Note: See TracBrowser for help on using the repository browser.