summaryrefslogtreecommitdiffstats
path: root/ftp/vsftpd/PRE_BUILD
blob: 8dbe1a04ae2971599776002fbb1f7750c5636093 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
default_pre_build &&
cd "$SOURCE_DIRECTORY" &&

#
# We don't want to install into /usr/local, so
# we'll just copy the files correctly
#
patch  -p0  <  ${SPELL_DIRECTORY}/mk.diff  &&

#
# Fix CFLAGS
#
sedit '
	/^CFLAGS[\t ]*=/!b
	:C /\\$/ {N; b C}
	s/=[\t ]*-O2/+=/
	s/ -Werror / /
' Makefile &&

#
# Should be made to allow someone to say "n" even if
# the package is installed, but this is the easy way
# I'm doing it for now. :)
#
if  spell_ok  tcp_wrappers;  then
  sedit  "/^#undef VSF_BUILD_TCPWRAPPERS/{s/undef/define/}"  builddefs.h
fi  &&

if  spell_ok  openssl;  then
  sedit  "/^#undef VSF_BUILD_SSL/{s/undef/define/}"  builddefs.h
fi  &&

#
# builddefs.h defaults to using Linux-PAM
#
if  !  spell_ok  linux-pam;  then
  sedit  "/^#define VSF_BUILD_PAM/{s/define/undef/}"  builddefs.h
fi