]> git.proxmox.com Git - libxdgmime-perl.git/blame - Xdgmime/Makefile.PL
update bindings
[libxdgmime-perl.git] / Xdgmime / Makefile.PL
CommitLineData
94212449 1use 5.036000;
a1d229d1
DM
2use ExtUtils::MakeMaker;
3# See lib/ExtUtils/MakeMaker.pm for details of how to influence
4# the contents of the Makefile that is written.
5WriteMakefile(
6 NAME => 'Xdgmime',
e66585f4 7 VERSION_FROM => 'lib/Xdgmime.pm', # finds $VERSION, requires EU::MM from perl >= 5.5
a1d229d1 8 PREREQ_PM => {}, # e.g., Module::Name => 1.1
e66585f4
SI
9 ABSTRACT_FROM => 'lib/Xdgmime.pm', # retrieve abstract from module
10 AUTHOR => 'stoiko ivanov <siv@>',
11 #LICENSE => 'perl',
12 #Value must be from legacy list of licenses here
13 #https://metacpan.org/pod/Module::Build::API
a1d229d1
DM
14 LIBS => [''], # e.g., '-lm'
15 DEFINE => '-DHAVE_MMAP', # e.g., '-DHAVE_SOMETHING'
16 INC => '-I.', # e.g., '-I. -I/usr/include/other'
a1d229d1
DM
17 OBJECT => '$(O_FILES)', # link all the C files too
18);
19if (eval {require ExtUtils::Constant; 1}) {
20 # If you edit these definitions to change the constants used by this module,
21 # you will need to use the generated const-c.inc and const-xs.inc
22 # files to replace their "fallback" counterparts before distributing your
23 # changes.
24 my @names = (qw(XDG_MIME_TYPE_EMPTY XDG_MIME_TYPE_TEXTPLAIN
e66585f4 25 XDG_MIME_TYPE_UNKNOWN));
a1d229d1
DM
26 ExtUtils::Constant::WriteConstants(
27 NAME => 'Xdgmime',
28 NAMES => \@names,
e66585f4 29 DEFAULT_TYPE => 'PV',
a1d229d1
DM
30 C_FILE => 'const-c.inc',
31 XS_FILE => 'const-xs.inc',
32 );
33
34}
35else {
36 use File::Copy;
37 use File::Spec;
38 foreach my $file ('const-c.inc', 'const-xs.inc') {
39 my $fallback = File::Spec->catfile('fallback', $file);
40 copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
41 }
42}