Setting tag util-vserver-pl-0.4-29
[util-vserver-pl.git] / Makefile.am
1 # Copyright (C) 2003,2004,2005,2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
2 #  
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2, or (at your option)
6 # any later version.
7 #  
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #  
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 #  
17
18 python_vserverimpl_la_SOURCES = python/vserverimpl.c 
19 python_vserverimpl_la_LIBADD =  -lvserver
20 python_vserverimpl_la_CFLAGS =  -Wno-redundant-decls -I$(top_srcdir)/src $(PYTHON_INCLUDES)
21 python_vserverimpl_la_LDFLAGS = -module -avoid-version
22
23 src_vip6_autod_SOURCES =        src/vip6-autod.c
24 src_vip6_autod_LDADD =          -lvserver -lnl
25
26 src_vsh_SOURCES =               src/vsh.c
27
28 man_MANS =                      man/vsh.8
29
30 pyexec_LTLIBRARIES =            python/vserverimpl.la
31
32 pyexec_DATA =                   python/vserver.py \
33                                 python/cpulimit.py
34
35 sbin_SCRIPTS =                  python/disklimit \
36                                 scripts/vuseradd \
37                                 scripts/vuserdel
38
39 sbin_PROGRAMS =                 src/vsh 
40
41 sysv_SCRIPTS =                  
42
43 if ENSC_HAVE_LIBNL
44 sbin_PROGRAMS +=                src/vip6-autod
45 sysv_SCRIPTS +=                 sysv/vip6-autod
46 endif
47
48 crondir =                       $(sysconfdir)/cron.d
49
50 logrotatedir =                  $(sysconfdir)/logrotate.d
51
52 install-data-hook: install-fix-script-paths
53
54 fix_SCRPTS =                    $(addprefix $(sbindir)/,  $(notdir $(sbin_SCRIPTS))) \
55                                 $(addprefix $(sysvdir)/,  $(notdir $(sysv_SCRIPTS)))
56
57 install-fix-script-paths:
58         test "$(UV_PKGLIBDIR)" = "/usr/lib/util-vserver" || \
59         for i in $(fix_SCRPTS); do \
60                 f="$(DESTDIR)$$i"; \
61                 $(SED) -e 's!/usr/lib/util-vserver!$(UV_PKGLIBDIR)!g' "$$f" > "$$f.tmp"; \
62                 cmp -s "$$f.tmp" "$$f" || cat "$$f.tmp" > "$$f"; \
63                 rm -f "$$f.tmp"; \
64         done