source: trunk/debian/packages/mtd/trunk/debian/rules @ 851

Last change on this file since 851 was 851, checked in by amain, 3 years ago

mtd: initial partly import - part 3

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/usr/bin/make -f
2
3export DH_VERBOSE=1
4
5DEB_HOST_GNU_TYPE?=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
6CC=$(DEB_HOST_GNU_TYPE)-gcc
7DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
8
9PACKAGE_VERSION := $(shell grep ^Source: debian/control | sed 's/^.*swconfig//')
10PACKAGE         := swconfig$(PACKAGE_VERSION)
11PACKAGE_LIB     := libsw$(PACKAGE_VERSION)
12PACKAGE_DEV     := libsw-dev
13
14# ../include contains switch.sh kernel API (see patch 007)
15CFLAGS+=-O2 -g -I ../include/uapi -I /usr/include/netlink-tiny
16
17# not all variables are exported by default
18export PACKAGE
19export PACKAGE_LIB
20export PACKAGE_VERSION
21
22%:
23        dh $@ 
24
25override_dh_auto_build: 
26        $(MAKE) -C src
27
28override_dh_auto_test:
29        :
30
31override_dh_auto_install:
32        install -d debian/$(PACKAGE)/usr/sbin
33        install -d debian/$(PACKAGE_LIB)/usr/lib/$(DEB_HOST_MULTIARCH)
34        install -d debian/$(PACKAGE_DEV)/usr/lib/$(DEB_HOST_MULTIARCH)
35        install -d debian/$(PACKAGE_DEV)/usr/include/sw
36        install src/$(PACKAGE) debian/$(PACKAGE)/usr/sbin/$(PACKAGE)
37        cp -v src/libsw.so.*.*.* debian/$(PACKAGE_LIB)/usr/lib/$(DEB_HOST_MULTIARCH)
38        cp -dv src/libsw.so.* debian/$(PACKAGE_LIB)/usr/lib/$(DEB_HOST_MULTIARCH)
39        cp -dv src/libsw.so debian/$(PACKAGE_DEV)/usr/lib/$(DEB_HOST_MULTIARCH)
40        cp -v src/swlib.h debian/$(PACKAGE_DEV)/usr/include/sw
41
42override_dh_auto_clean:
43        rm -f src/swconfig src/*.o src/libsw.*
44
Note: See TracBrowser for help on using the repository browser.