~ubuntu-branches/ubuntu/vivid/samba/vivid

« back to all changes in this revision

Viewing changes to source3/samba4-templates.mk

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Templates file for Samba 4
2
 
# This relies on GNU make.
3
 
#
4
 
# © 2008 Jelmer Vernooij <jelmer@samba.org>
5
 
#
6
 
###############################################################################
7
 
# Templates
8
 
###############################################################################
9
 
 
10
 
# Partially link
11
 
# Arguments: target object file, source object files
12
 
define partial_link_template 
13
 
$(1): $(2) ;
14
 
        @echo Partially linking $$@
15
 
        @mkdir -p $$(@D)
16
 
        @$$(PARTLINK) -o $$@ $$^
17
 
endef
18
 
 
19
 
# Link a binary
20
 
# Arguments: target file, depends, flags
21
 
define binary_link_template
22
 
$(1)4: $(2) ;
23
 
        @echo Linking $$@
24
 
        @$$(BNLD) $$(BNLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3)  $$(LIBS)
25
 
clean::
26
 
        @rm -f $(1)
27
 
 
28
 
everything:: $(1)4
29
 
 
30
 
endef
31
 
 
32
 
# Link a host-machine binary
33
 
# Arguments: target file, depends, flags
34
 
define host_binary_link_template
35
 
$(1)4: $(2) ;
36
 
        @echo Linking $$@
37
 
        @$$(HOSTLD) $$(HOSTLD_FLAGS) -L$${builddir}/bin/static -o $$@ $$(INSTALL_LINK_FLAGS) $(3)
38
 
 
39
 
clean::
40
 
        rm -f $(1)
41
 
 
42
 
binaries:: $(1)4
43
 
 
44
 
 
45
 
endef
46
 
 
47
 
# Create a prototype header
48
 
# Arguments: header file, c files
49
 
define proto_header_template
50
 
echo:: ;
51
 
        echo $(1) ;
52
 
 
53
 
proto:: $(1) ;
54
 
 
55
 
clean:: ;
56
 
        rm -f $(1) ;
57
 
 
58
 
$(1): $(2) ;
59
 
        @echo "Creating $$@"
60
 
        @$$(PERL) $$(srcdir)/../source4/script/mkproto.pl --srcdir=$$(srcdir)/../source4 --builddir=$$(builddir)/../source4 --public=/dev/null --private=$$@ $$^
61
 
endef
62
 
 
63
 
# Shared module
64
 
# Arguments: Target, dependencies, objects
65
 
define shared_module_template
66
 
 
67
 
$(1): $(2) ;
68
 
        @echo Linking $$@
69
 
        @mkdir -p $$(@D)
70
 
        @$$(MDLD) $$(LDFLAGS) $$(MDLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3)
71
 
 
72
 
PLUGINS += $(1)
73
 
 
74
 
endef
75
 
 
76
 
# Shared library
77
 
# Arguments: Target, dependencies, link flags, soname
78
 
define shared_library_template
79
 
$(1): $(2)
80
 
        @echo Linking $$@
81
 
        @mkdir -p $$(@D)
82
 
        @$$(SHLD) $$(LDFLAGS) $$(SHLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) \
83
 
                $(3) \
84
 
                $$(if $$(SONAMEFLAG), $$(SONAMEFLAG)$(notdir $(4))) $$(LIBS)
85
 
 
86
 
ifneq ($(notdir $(1)),$(notdir $(4)))
87
 
$(4): $(1)
88
 
        @echo "Creating symbolic link for $$@"
89
 
        @ln -fs $$(<F) $$@
90
 
endif
91
 
 
92
 
ifneq ($(notdir $(1)),$(notdir $(5)))
93
 
$(5): $(1) $(4)
94
 
        @echo "Creating symbolic link for $$@"
95
 
        @ln -fs $$(<F) $$@
96
 
endif
97
 
endef
98
 
 
99
 
# Shared alias
100
 
# Arguments: Target, subsystem name, alias name
101
 
define shared_module_alias_template
102
 
bin/modules/$(2)/$(3).$$(SHLIBEXT): $(1)
103
 
        @ln -fs $$(<F) $$@
104
 
 
105
 
PLUGINS += bin/modules/$(2)/$(3).$$(SHLIBEXT)
106
 
 
107
 
uninstallplugins::
108
 
        @-rm $$(DESTDIR)$$(modulesdir)/$(2)/$(3).$$(SHLIBEXT)
109
 
installplugins::
110
 
        @ln -fs $(1) $$(DESTDIR)$$(modulesdir)/$(2)/$(3).$$(SHLIBEXT)
111
 
 
112
 
endef
113
 
 
114
 
define shared_module_install_template
115
 
installplugins:: bin/modules/$(1)/$(2)
116
 
        @echo Installing $(2) as $$(DESTDIR)$$(modulesdir)/$(1)/$(2)
117
 
        @mkdir -p $$(DESTDIR)$$(modulesdir)/$(1)/
118
 
        @cp bin/modules/$(1)/$(2) $$(DESTDIR)$$(modulesdir)/$(1)/$(2)
119
 
uninstallplugins::
120
 
        @echo Uninstalling $$(DESTDIR)$$(modulesdir)/$(1)/$(2)
121
 
        @-rm $$(DESTDIR)$$(modulesdir)/$(1)/$(2)
122
 
 
123
 
endef
124
 
 
125
 
# abspath for older makes
126
 
abspath = $(shell cd $(dir $(1)); pwd)/$(notdir $(1))
127
 
 
128
 
# Install a binary
129
 
# Arguments: path to binary to install
130
 
define binary_install_template
131
 
installbin:: $$(DESTDIR)$$(bindir)/$(notdir $(1))4
132
 
 
133
 
uninstallbin::
134
 
        @echo "Removing $(notdir $(1))4"
135
 
        @rm -f $$(DESTDIR)$$(bindir)/$(1)4
136
 
endef
137
 
 
138
 
define sbinary_install_template
139
 
installsbin:: $$(DESTDIR)$$(sbindir)/$(notdir $(1))4 installdirs
140
 
                                
141
 
uninstallsbin::
142
 
        @echo "Removing $(notdir $(1))4"
143
 
        @rm -f $$(DESTDIR)$$(sbindir)/$(1)4
144
 
endef