Workaround FUSE missing the generally broken Linux kernel charset support.
[captive.git] / src / client / fuse / Makefile.am
1 # $Id$
2 # automake source for the fuse module for fuse Makefile 
3 # Copyright (C) 2005 Jan Kratochvil <project-captive@jankratochvil.net>
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18
19 include $(top_srcdir)/Makefile-head.am
20 include $(top_srcdir)/src/libcaptive/Makefile-libcaptive.am
21
22 mount_captive_SOURCES= \
23                 op_statfs.c \
24                 op_statfs.h \
25                 op_fsync.c \
26                 op_fsync.h \
27                 op_fsyncdir.c \
28                 op_fsyncdir.h \
29                 op_opendir.c \
30                 op_opendir.h \
31                 op_readdir.c \
32                 op_readdir.h \
33                 op_releasedir.c \
34                 op_releasedir.h \
35                 op_open.c \
36                 op_open.h \
37                 op_read.c \
38                 op_read.h \
39                 op_release.c \
40                 op_release.h \
41                 op_getattr.c \
42                 op_getattr.h \
43                 op_mknod.c \
44                 op_mknod.h \
45                 op_unlink.c \
46                 op_unlink.h \
47                 op_mkdir.c \
48                 op_mkdir.h \
49                 op_rmdir.c \
50                 op_rmdir.h \
51                 op_chmod.c \
52                 op_chmod.h \
53                 op_truncate.c \
54                 op_truncate.h \
55                 op_write.c \
56                 op_write.h \
57                 op_rename.c \
58                 op_rename.h \
59                 op_utime.c \
60                 op_utime.h \
61                 gnomevfsresult.c \
62                 gnomevfsresult.h \
63                 capfuse_captive_file_info_object.c \
64                 capfuse_captive_file_info_object.h \
65                 main.c \
66                 main.h \
67                 utf8.c \
68                 utf8.h
69 mount_captive_CFLAGS=                   $(GNOME_VFS_CFLAGS) $(LIBXML_CFLAGS) $(FUSE_CFLAGS)
70 mount_captive_LDADD =$(captive_library) $(GNOME_VFS_LIBS)   $(LIBXML_LIBS)   $(FUSE_LIBS)   $(INTLLIBS)
71 mount_captive_LDFLAGS=$(READLINE_LDFLAGS)
72
73 mount_captive_CFLAGS+=-DLIBEXECDIR="$(libexecdir)"
74 mount_captive_CFLAGS+=-DVARLIBCAPTIVEDIR="$(localstatedir)/lib/$(PACKAGE)"
75
76
77 if ENABLE_FUSE
78 if ENABLE_SBIN_MOUNT
79 mount_captive_cond=mount.captive
80 initd_SCRIPTS_cond=captive
81
82 if ENABLE_STANDALONE
83 libexec_PROGRAMS_cond=captive-fusermount
84
85 install-exec-hook-captive-fusermount:
86         chown root.fuse $(DESTDIR)/$(libexecdir)/captive-fusermount
87         chmod 4754      $(DESTDIR)/$(libexecdir)/captive-fusermount
88         if grep -q '^fuse:' /etc/group;then true;else \
89                 echo "ERROR: Add 'fuse' to your '/etc/group'; see groupadd(8)"; \
90                 exit 1; \
91         fi;
92
93 else
94 install-exec-hook-captive-fusermount:
95         @true
96
97 endif
98
99 # Do not: libexecPROGRAMS_INSTALL=${INSTALL} -o root -g fuse -m 4754
100 # as it works only on Fedora Core based systems, at least SuSE 10.0 correctly fails.
101 #       https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=176708
102
103 install-exec-hook:
104         $(mkinstalldirs) $(DESTDIR)$(enable_sbin_mountdir)
105         IFS=:; \
106         enable_sbin_mount_fs="$(enable_sbin_mount_fs)"; \
107         for fs in $$enable_sbin_mount_fs; do \
108                 if test $$fs != no; then \
109                         $(RM) $(DESTDIR)$(enable_sbin_mountdir)/mount.captive-$$fs; \
110                         $(LN_S) mount.captive $(DESTDIR)$(enable_sbin_mountdir)/mount.captive-$$fs; \
111                 fi; \
112                 done
113         if test `id -u` -eq 0 -a -z "$(DESTDIR)";then \
114                 $(MAKE) $(AM_MAKEFLAGS) install-exec-hook-captive-fusermount; \
115         fi
116
117 else
118 install-exec-hook:
119         @true
120
121 endif
122 else
123 install-exec-hook:
124         @true
125
126 endif
127 enable_sbin_mount_PROGRAMS=$(mount_captive_cond)
128
129 EXTRA_DIST+=mount.captive.pod.pl.in
130 CLEANFILES+=mount.captive.pod mount.captive.1
131
132 if ENABLE_MAN_PAGES
133 if ENABLE_FUSE
134 if ENABLE_SBIN_MOUNT
135 mount_captive_man_cond=mount.captive.8
136 endif
137 endif
138 endif
139 man_MANS=$(mount_captive_man_cond)
140
141 initd_SCRIPTS=$(initd_SCRIPTS_cond)
142 EXTRA_DIST+=captive.init
143 CLEANFILES+=captive
144 captive: captive.init
145         $(LN_S) $< $@
146
147 captive_fusermount_SOURCES= \
148                 fusermount.c
149 captive_fusermount_CFLAGS=
150 captive_fusermount_LDADD =$(captive_library)
151 libexec_PROGRAMS=$(libexec_PROGRAMS_cond)