]> iEval git - linux-seccomp.git/blob - Makefile.PL
c2dca8ed2bf6b9fc05b5d4a8447e277087d48b88
[linux-seccomp.git] / Makefile.PL
1 use 5.014000;
2 use Devel::CheckLib;
3 use ExtUtils::MakeMaker;
4
5 check_lib_or_exit
6 lib => 'seccomp';
7
8 WriteMakefile(
9 NAME => 'Linux::Seccomp',
10 VERSION_FROM => 'lib/Linux/Seccomp.pm',
11 ABSTRACT_FROM => 'lib/Linux/Seccomp.pm',
12 AUTHOR => 'Marius Gavrilescu <marius@ieval.ro>',
13 MIN_PERL_VERSION => '5.14.0',
14 LICENSE => 'perl',
15 SIGN => 1,
16 CONFIGURE_REQUIRES => {
17 qw/Devel::CheckLib 0
18 ExtUtils::MakeMaker 0/,
19 },
20 PREREQ_PM => {},
21 LIBS => ['-lseccomp'],
22 MYEXTLIB => 'libseccomp/src/.libs/libseccomp$(LIB_EXT)',
23 clean => { FILES => 'libseccomp/src/.libs/libseccomp$(LIB_EXT)' },
24 META_ADD => {
25 dynamic_config => 1,
26 resources => {
27 repository => 'https://git.ieval.ro/?p=linux-seccomp.git',
28 },
29 }
30 );
31
32 sub MY::postamble {
33 '
34 $(MYEXTLIB): libseccomp/configure
35 cd libseccomp && ./configure && `which gmake || echo $(MAKE)` all
36 '
37 }
38
39 if (eval {require ExtUtils::Constant; 1}) {
40 # If you edit these definitions to change the constants used by this module,
41 # you will need to use the generated const-c.inc and const-xs.inc
42 # files to replace their "fallback" counterparts before distributing your
43 # changes.
44 my @names = (qw(AUDIT_ARCH_AARCH64 AUDIT_ARCH_MIPS AUDIT_ARCH_MIPS64
45 AUDIT_ARCH_MIPS64N32 AUDIT_ARCH_MIPSEL64N32 AUDIT_ARCH_PPC64LE
46 EM_AARCH64 EM_MIPS SCMP_ACT_ALLOW SCMP_ACT_KILL SCMP_ACT_TRAP
47 SCMP_ARCH_AARCH64 SCMP_ARCH_ARM SCMP_ARCH_MIPS
48 SCMP_ARCH_MIPS64 SCMP_ARCH_MIPS64N32 SCMP_ARCH_MIPSEL
49 SCMP_ARCH_MIPSEL64 SCMP_ARCH_MIPSEL64N32 SCMP_ARCH_NATIVE
50 SCMP_ARCH_PPC SCMP_ARCH_PPC64 SCMP_ARCH_PPC64LE SCMP_ARCH_S390
51 SCMP_ARCH_S390X SCMP_ARCH_X32 SCMP_ARCH_X86 SCMP_ARCH_X86_64
52 SCMP_VER_MAJOR SCMP_VER_MICRO SCMP_VER_MINOR
53 __AUDIT_ARCH_CONVENTION_MIPS64_N32 __NR_SCMP_ERROR
54 __NR_SCMP_UNDEF __NR__llseek __NR__newselect __NR__sysctl
55 __NR_accept __NR_accept4 __NR_access __NR_afs_syscall
56 __NR_alarm __NR_arch_prctl __NR_arm_fadvise64_64
57 __NR_arm_sync_file_range __NR_bdflush __NR_bind __NR_break
58 __NR_breakpoint __NR_cachectl __NR_cacheflush __NR_chmod
59 __NR_chown __NR_chown32 __NR_connect __NR_creat
60 __NR_create_module __NR_dup2 __NR_epoll_create
61 __NR_epoll_ctl_old __NR_epoll_wait __NR_epoll_wait_old
62 __NR_eventfd __NR_fadvise64 __NR_fadvise64_64 __NR_fchown32
63 __NR_fcntl64 __NR_fork __NR_fstat64 __NR_fstatat64
64 __NR_fstatfs64 __NR_ftime __NR_ftruncate64 __NR_futimesat
65 __NR_get_kernel_syms __NR_get_mempolicy __NR_get_thread_area
66 __NR_getdents __NR_getegid32 __NR_geteuid32 __NR_getgid32
67 __NR_getgroups32 __NR_getpeername __NR_getpgrp __NR_getpmsg
68 __NR_getrandom __NR_getresgid32 __NR_getresuid32
69 __NR_getrlimit __NR_getsockname __NR_getsockopt __NR_getuid32
70 __NR_gtty __NR_idle __NR_inotify_init __NR_ioperm __NR_iopl
71 __NR_ipc __NR_kexec_file_load __NR_lchown __NR_lchown32
72 __NR_link __NR_listen __NR_lock __NR_lstat __NR_lstat64
73 __NR_mbind __NR_membarrier __NR_memfd_create
74 __NR_migrate_pages __NR_mkdir __NR_mknod __NR_mmap __NR_mmap2
75 __NR_modify_ldt __NR_move_pages __NR_mpx __NR_msgctl
76 __NR_msgget __NR_msgrcv __NR_msgsnd __NR_multiplexer
77 __NR_newfstatat __NR_nfsservctl __NR_nice __NR_oldfstat
78 __NR_oldlstat __NR_oldolduname __NR_oldstat __NR_olduname
79 __NR_oldwait4 __NR_open __NR_pause __NR_pciconfig_iobase
80 __NR_pciconfig_read __NR_pciconfig_write __NR_pipe __NR_poll
81 __NR_prof __NR_profil __NR_putpmsg __NR_query_module
82 __NR_readdir __NR_readlink __NR_recv __NR_recvfrom
83 __NR_recvmmsg __NR_recvmsg __NR_rename __NR_rmdir __NR_rtas
84 __NR_s390_pci_mmio_read __NR_s390_pci_mmio_write
85 __NR_s390_runtime_instr __NR_security __NR_select __NR_semctl
86 __NR_semget __NR_semop __NR_semtimedop __NR_send
87 __NR_sendfile64 __NR_sendmmsg __NR_sendmsg __NR_sendto
88 __NR_set_mempolicy __NR_set_thread_area __NR_set_tls
89 __NR_setfsgid32 __NR_setfsuid32 __NR_setgid32 __NR_setgroups32
90 __NR_setregid32 __NR_setresgid32 __NR_setresuid32
91 __NR_setreuid32 __NR_setsockopt __NR_setuid32 __NR_sgetmask
92 __NR_shmat __NR_shmctl __NR_shmdt __NR_shmget __NR_shutdown
93 __NR_sigaction __NR_signal __NR_signalfd __NR_sigpending
94 __NR_sigprocmask __NR_sigreturn __NR_sigsuspend __NR_socket
95 __NR_socketcall __NR_socketpair __NR_spu_create __NR_spu_run
96 __NR_ssetmask __NR_stat __NR_stat64 __NR_statfs64 __NR_stime
97 __NR_stty __NR_subpage_prot __NR_swapcontext
98 __NR_switch_endian __NR_symlink __NR_sync_file_range
99 __NR_sync_file_range2 __NR_sys_debug_setcontext __NR_syscall
100 __NR_sysfs __NR_sysmips __NR_time __NR_timerfd __NR_truncate64
101 __NR_tuxcall __NR_ugetrlimit __NR_ulimit __NR_umount
102 __NR_unlink __NR_uselib __NR_userfaultfd __NR_usr26 __NR_usr32
103 __NR_ustat __NR_utime __NR_utimes __NR_vfork __NR_vm86
104 __NR_vm86old __NR_vserver __NR_waitpid __PNR__llseek
105 __PNR__newselect __PNR__sysctl __PNR_accept __PNR_accept4
106 __PNR_access __PNR_afs_syscall __PNR_alarm __PNR_arch_prctl
107 __PNR_arm_fadvise64_64 __PNR_arm_sync_file_range __PNR_bdflush
108 __PNR_bind __PNR_break __PNR_breakpoint __PNR_cachectl
109 __PNR_cacheflush __PNR_chmod __PNR_chown __PNR_chown32
110 __PNR_connect __PNR_creat __PNR_create_module __PNR_dup2
111 __PNR_epoll_create __PNR_epoll_ctl_old __PNR_epoll_wait
112 __PNR_epoll_wait_old __PNR_eventfd __PNR_fadvise64
113 __PNR_fadvise64_64 __PNR_fchown32 __PNR_fcntl64 __PNR_fork
114 __PNR_fstat64 __PNR_fstatat64 __PNR_fstatfs64 __PNR_ftime
115 __PNR_ftruncate64 __PNR_futimesat __PNR_get_kernel_syms
116 __PNR_get_mempolicy __PNR_get_thread_area __PNR_getdents
117 __PNR_getegid32 __PNR_geteuid32 __PNR_getgid32
118 __PNR_getgroups32 __PNR_getpeername __PNR_getpgrp
119 __PNR_getpmsg __PNR_getrandom __PNR_getresgid32
120 __PNR_getresuid32 __PNR_getrlimit __PNR_getsockname
121 __PNR_getsockopt __PNR_getuid32 __PNR_gtty __PNR_idle
122 __PNR_inotify_init __PNR_ioperm __PNR_iopl __PNR_ipc
123 __PNR_kexec_file_load __PNR_lchown __PNR_lchown32 __PNR_link
124 __PNR_listen __PNR_lock __PNR_lstat __PNR_lstat64 __PNR_mbind
125 __PNR_membarrier __PNR_memfd_create __PNR_migrate_pages
126 __PNR_mkdir __PNR_mknod __PNR_mmap __PNR_mmap2
127 __PNR_modify_ldt __PNR_move_pages __PNR_mpx __PNR_msgctl
128 __PNR_msgget __PNR_msgrcv __PNR_msgsnd __PNR_multiplexer
129 __PNR_newfstatat __PNR_nfsservctl __PNR_nice __PNR_oldfstat
130 __PNR_oldlstat __PNR_oldolduname __PNR_oldstat __PNR_olduname
131 __PNR_oldwait4 __PNR_open __PNR_pause __PNR_pciconfig_iobase
132 __PNR_pciconfig_read __PNR_pciconfig_write __PNR_pipe
133 __PNR_poll __PNR_prof __PNR_profil __PNR_putpmsg
134 __PNR_query_module __PNR_readdir __PNR_readlink __PNR_recv
135 __PNR_recvfrom __PNR_recvmmsg __PNR_recvmsg __PNR_rename
136 __PNR_rmdir __PNR_rtas __PNR_s390_pci_mmio_read
137 __PNR_s390_pci_mmio_write __PNR_s390_runtime_instr
138 __PNR_security __PNR_select __PNR_semctl __PNR_semget
139 __PNR_semop __PNR_semtimedop __PNR_send __PNR_sendfile64
140 __PNR_sendmmsg __PNR_sendmsg __PNR_sendto __PNR_set_mempolicy
141 __PNR_set_thread_area __PNR_set_tls __PNR_setfsgid32
142 __PNR_setfsuid32 __PNR_setgid32 __PNR_setgroups32
143 __PNR_setregid32 __PNR_setresgid32 __PNR_setresuid32
144 __PNR_setreuid32 __PNR_setsockopt __PNR_setuid32
145 __PNR_sgetmask __PNR_shmat __PNR_shmctl __PNR_shmdt
146 __PNR_shmget __PNR_shutdown __PNR_sigaction __PNR_signal
147 __PNR_signalfd __PNR_sigpending __PNR_sigprocmask
148 __PNR_sigreturn __PNR_sigsuspend __PNR_socket __PNR_socketcall
149 __PNR_socketpair __PNR_spu_create __PNR_spu_run __PNR_ssetmask
150 __PNR_stat __PNR_stat64 __PNR_statfs64 __PNR_stime __PNR_stty
151 __PNR_subpage_prot __PNR_swapcontext __PNR_switch_endian
152 __PNR_symlink __PNR_sync_file_range __PNR_sync_file_range2
153 __PNR_sys_debug_setcontext __PNR_syscall __PNR_sysfs
154 __PNR_sysmips __PNR_time __PNR_timerfd __PNR_truncate64
155 __PNR_tuxcall __PNR_ugetrlimit __PNR_ulimit __PNR_umount
156 __PNR_unlink __PNR_uselib __PNR_userfaultfd __PNR_usr26
157 __PNR_usr32 __PNR_ustat __PNR_utime __PNR_utimes __PNR_vfork
158 __PNR_vm86 __PNR_vm86old __PNR_vserver __PNR_waitpid),
159 {name=>"SCMP_CMP_EQ", macro=>"1"},
160 {name=>"SCMP_CMP_GE", macro=>"1"},
161 {name=>"SCMP_CMP_GT", macro=>"1"},
162 {name=>"SCMP_CMP_LE", macro=>"1"},
163 {name=>"SCMP_CMP_LT", macro=>"1"},
164 {name=>"SCMP_CMP_MASKED_EQ", macro=>"1"},
165 {name=>"SCMP_CMP_NE", macro=>"1"},
166 {name=>"SCMP_FLTATR_ACT_BADARCH", macro=>"1"},
167 {name=>"SCMP_FLTATR_ACT_DEFAULT", macro=>"1"},
168 {name=>"SCMP_FLTATR_CTL_NNP", macro=>"1"},
169 {name=>"SCMP_FLTATR_CTL_TSYNC", macro=>"1"},
170 {name=>"_SCMP_CMP_MAX", macro=>"1"},
171 {name=>"_SCMP_CMP_MIN", macro=>"1"},
172 {name=>"_SCMP_FLTATR_MAX", macro=>"1"},
173 {name=>"_SCMP_FLTATR_MIN", macro=>"1"});
174 ExtUtils::Constant::WriteConstants(
175 NAME => 'Linux::Seccomp',
176 NAMES => \@names,
177 DEFAULT_TYPE => 'IV',
178 C_FILE => 'const-c.inc',
179 XS_FILE => 'const-xs.inc',
180 );
181
182 }
183 else {
184 use File::Copy;
185 use File::Spec;
186 foreach my $file ('const-c.inc', 'const-xs.inc') {
187 my $fallback = File::Spec->catfile('fallback', $file);
188 copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
189 }
190 }
This page took 0.054982 seconds and 4 git commands to generate.