forked from LinuxCNC/linuxcnc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrules.in
126 lines (109 loc) · 4.16 KB
/
rules.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#!/usr/bin/make -f
# Simple set of debian/rules that uses debhelper.
# Based on an example by Joey Hess.
# extended by Paul Corner, Alex Joni, Chris Radek, Jeff Epler (in cronological order)
# Copyright (C) 2006 Jeff Epler
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# When used to produce a debian package, this file is a script "used to
# control compilation and installation of the executable"
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
kernel_version = @KERNEL_VERSION@
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
cd src && ./autogen.sh
ifeq "$(kernel_version)" "uspace"
cd src && ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --with-realtime=uspace --enable-build-documentation=pdf --disable-check-runtime-deps
else
cd src && ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --with-realtime=/usr/realtime-$(kernel_version) --enable-build-documentation=pdf --disable-check-runtime-deps
endif
(cd src; $(MAKE) $(MAKEFLAGS) && $(MAKE) $(MAKEFLAGS) docs)
touch build-stamp
clean: debian/control
dh_testdir
dh_testroot
rm -f build-stamp
cd src && ./autogen.sh
ifeq "$(kernel_version)" "uspace"
cd src && ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --with-realtime=uspace --enable-build-documentation=pdf --disable-check-runtime-deps
else
cd src && ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --with-realtime=/usr/realtime-$(kernel_version) --enable-build-documentation=pdf --disable-check-runtime-deps
endif
cd src && $(MAKE) clean -s
rm -f Makefile.inc
rm -f src/config.log src/config.status
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# start the install
mkdir -p debian/tmp
# Version 0.22 and newer of the desktop-file-validate program
# (in Jessie and newer) can deal with multiple files specified
# on the command line. Version 0.20 (in Wheezy) says it can,
# but can't. So feed it the files one by one.
for F in $(shell find debian/extras/ -name *.desktop); do \
desktop-file-validate $$F; \
done
-(cd debian/@EXTRAS@ && cp -a * ../tmp)
(cd src; export DESTDIR=`pwd`/../debian/tmp; $(MAKE) $@)
mkdir -p debian/tmp/usr/lib debian/tmp/usr/include/linuxcnc
cp lib/*.a debian/tmp/usr/lib
mkdir -p debian/tmp/usr/share/doc/linuxcnc-dev
mv debian/tmp/usr/share/doc/linuxcnc/LinuxCNC_Developer_Manual.pdf \
debian/tmp/usr/share/doc/linuxcnc-dev/
cp docs/html/gcode*.html debian/tmp/usr/share/doc/linuxcnc/
rm -rf debian/tmp/usr/share/doc/linuxcnc/html
-rm debian/tmp/linuxcnc*.files
-rm -f debian/tmp/usr/share/doc/linuxcnc/examples/sample-configs/*/*position*.txt
(cd debian/tmp/usr/share/doc/linuxcnc/examples; \
ln -sf ../../../linuxcnc/ncfiles ./nc_files)
dh_movefiles
if [ `find debian/tmp -type f | wc -c` != 0 ]; then \
echo "Files exist in debian/tmp, but should not:"; \
find debian/tmp -type f; \
exit 1; \
fi
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installman
dh_installmime
dh_link
dh_strip
dh_compress -X.pdf -X.txt -X.hal -X.ini -X.clp -X.var -X.nml -X.tbl -X.xml -Xsample-configs
dh_fixperms -X/linuxcnc_module_helper -X/rtapi_app
@PYTHON_PACKAGING@
dh_makeshlibs
dh_installdeb
cat debian/@MAIN_PACKAGE_NAME@/DEBIAN/shlibs debian/shlibs.pre > debian/shlibs.local
dh_shlibdeps -l debian/@MAIN_PACKAGE_NAME@/usr/lib
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
debian/rules: debian/configure debian/*.in
debian/configure @TARGET@