1cflags{
2 '-D _GNU_SOURCE',
3 string.format([[-D 'SYSCONFDIR="%s/etc/libnl"']], config.prefix),
4 '-I $dir',
5 '-I $outdir/include',
6 '-I $srcdir/include',
7 '-I $srcdir/include/linux-private',
8 '-isystem $builddir/pkg/linux-headers/include',
9}
10
11build('sed', '$outdir/include/netlink/version.h', '$srcdir/include/netlink/version.h.in', {
12 expr={
13 '-e s,@PACKAGE_STRING@,\'libnl 3.5.0\',',
14 '-e s,@PACKAGE_VERSION@,3.5.0,',
15 '-e s,@MAJ_VERSION@,3,',
16 '-e s,@MIN_VERSION@,5,',
17 '-e s,@MIC_VERSION@,0,',
18 '-e s,@LT_CURRENT@,226,',
19 '-e s,@LT_REVISION@,0,',
20 '-e s,@LT_AGE@,26,',
21 },
22})
23
24pkg.hdrs = {
25 copy('$outdir/include/netlink', '$srcdir/include/netlink', {
26 'addr.h',
27 'attr.h',
28 'cache.h',
29 'cache-api.h',
30 'data.h',
31 'errno.h',
32 'handlers.h',
33 'hash.h',
34 'hashtable.h',
35 'list.h',
36 'msg.h',
37 'netlink.h',
38 'netlink-compat.h',
39 'netlink-kernel.h',
40 'object.h',
41 'object-api.h',
42 'socket.h',
43 'types.h',
44 'utils.h',
45 'genl/ctrl.h',
46 'genl/family.h',
47 'genl/genl.h',
48 'genl/mngt.h',
49 }),
50 '$outdir/include/netlink/version.h',
51}
52
53pkg.deps = {
54 '$gendir/headers',
55 'pkg/linux-headers/headers',
56}
57
58lib('libnl-3.a', [[lib/(
59 addr.c attr.c cache.c cache_mngr.c cache_mngt.c data.c
60 error.c handlers.c msg.c nl.c object.c socket.c utils.c
61 version.c hash.c hashtable.c mpls.c
62)]])
63
64lib('libnl-genl-3.a', 'lib/genl/(ctrl.c family.c genl.c mngt.c)')
65
66fetch 'git'