File: xz-manual.alienfile

package info (click to toggle)
libalien-build-perl 2.84-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,116 kB
  • sloc: perl: 10,350; ansic: 134; sh: 66; makefile: 2
file content (47 lines) | stat: -rw-r--r-- 1,358 bytes parent folder | download
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
use alienfile;

# see xz.alienfile for a more reliable and portable
# example that uses plugins.

# Use pkg-config to check if the library exists.
# also, use which to check that the xz command is
# in the path.
probe [
  'pkg-config --exists liblzma',
  'which xz',
];

share {

  start_url 'http://tukaani.org/xz/xz-5.2.3.tar.gz';

  # the first one which succeeds will be used
  download [ 'wget %{.meta.start_url}' ];
  download [ 'curl -O %{.meta.start_url}' ];

  # use tar to extract the tarball
  extract [ 'tar zxf %{.install.download}' ];

  # use the standard build process
  build [
    './configure --prefix=%{.install.prefix} --disable-shared',
    '%{make}',
    '%{make} install',
  ];

  # This package doesn't build a dynamic library by default, but if
  # it did this would make sure that it wasn't used with XS.
  # (See Alien::Build::Manual::AlienAuthor for details).
  plugin 'Gather::IsolateDynamic';

};

# You can specify individual gather steps in share {} or
# sys {} too, but for many cases the same procedure can
# be used for both.
gather [
  # store the (chomped) output into the appropriate runtime properties
  [ 'pkg-config', '--modversion', 'liblzma', \'%{.runtime.version}' ],
  [ 'pkg-config', '--cflags',     'liblzma', \'%{.runtime.cflags}'  ],
  [ 'pkg-config', '--libs',       'liblzma', \'%{.runtime.libs}'    ],
];