blob: dcd6de787db082a1ef6667c9ecd15379c4a9cd49 (
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
--- Makefile.in.orig Thu Sep 7 17:29:01 2006
+++ Makefile.in Mon Apr 16 19:56:30 2007
@@ -10,6 +10,18 @@
log_path_base = @log_path_base@
trc_path_base = @trc_path_base@
+# FreeBSD changes for correct pathname
+
+#ss5_pam = /usr/local/etc/pam.d/ss5
+#ss5_share = /usr/local/share/ss5
+#ss5_examples = /usr/local/share/examples/ss5
+#ss5_man = /usr/local/share/man
+
+ss5_pam = ${PREFIX}/etc/pam.d/ss5
+ss5_share = ${DATADIR}
+ss5_examples = ${EXAMPLESDIR}
+ss5_man = ${MANPREFIX}/man
+
SSOBJ = SS5Main.o \
SS5Core.o \
SS5Server.o \
@@ -42,10 +54,21 @@
@( if [ ! -d $(dst_dir)$(lib_path_base)/ss5 ]; then mkdir -p $(dst_dir)$(lib_path_base)/ss5; fi )
@( find modules -name *.so -exec cp {} $(dst_dir)$(lib_path_base)/ss5/ \; )
- @( cp modules/mod_statistics/statmgr.cgi $(dst_dir)$(lib_path_base)/ss5/ )
- @( cp modules/mod_balance/balamgr.cgi $(dst_dir)$(lib_path_base)/ss5/ )
- @( cp modules/mod_statistics/SS5Logo.jpg $(dst_dir)$(lib_path_base)/ss5/ )
- @( cp modules/mod_balance/SS5Logo.jpg $(dst_dir)$(lib_path_base)/ss5/ )
+
+ @( if [ ! -d $(ss5_share) ] && [ $(OS) = "FreeBSD" ]; then mkdir -p $(ss5_share); fi )
+ @( if [ $(OS) = "FreeBSD" ]; then \
+ cp modules/mod_statistics/statmgr.cgi $(ss5_share)/ ; \
+ cp modules/mod_balance/balamgr.cgi $(ss5_share)/ ; \
+ cp modules/mod_statistics/SS5Logo.jpg $(ss5_share)/ ; \
+ cp modules/mod_balance/SS5Logo.jpg $(ss5_share)/ ; \
+ fi )
+
+ @( if [ $(OS) = "Linux" ] || [ $(OS) = "SunOS" ]; then \
+ cp modules/mod_statistics/statmgr.cgi $(dst_dir)$(lib_path_base)/ss5/ ; \
+ cp modules/mod_balance/balamgr.cgi $(dst_dir)$(lib_path_base)/ss5/ ; \
+ cp modules/mod_statistics/SS5Logo.jpg $(dst_dir)$(lib_path_base)/ss5/ ; \
+ cp modules/mod_balance/SS5Logo.jpg $(dst_dir)$(lib_path_base)/ss5/ ; \
+ fi )
@( if [ $(OS) = "Linux" ]; then \
if [ ! -d $(dst_dir)/etc/rc.d/init.d ]; then mkdir -p $(dst_dir)/etc/rc.d/init.d; fi ; \
@@ -61,10 +84,6 @@
if [ ! -f $(dst_dir)/etc/init.d/ss5 ]; then cp conf/ss5.init $(dst_dir)/etc/init.d/ss5; \
else cp conf/ss5.init $(dst_dir)/etc/init.d/ss5.rpmnew ; fi ; \
fi )
- @( if [ $(OS) = "FreeBSD" ]; then \
- if [ ! -f /usr/local/etc/rc.d/ss5 ]; then cp conf/ss5.init /usr/local/etc/rc.d/ss5; \
- else cp conf/ss5.init /usr/local/etc/rc.d/ss5.rpmnew ; fi ; \
- fi )
@( if [ ! -d $(dst_dir)$(doc_path_base)/ss5 ]; then mkdir -p $(dst_dir)$(doc_path_base)/ss5; fi )
@( cp License $(dst_dir)$(doc_path_base)/ss5 )
@@ -74,27 +93,40 @@
@( cp modules/mod_balance/README.balamgr $(dst_dir)$(doc_path_base)/ss5 )
@( if [ ! -d $(dst_dir)$(man_path_base)/man1 ]; then mkdir -p $(dst_dir)$(man_path_base)/man1; fi )
- @( cp man/$(OS)/ss5.1* $(dst_dir)$(man_path_base)/man1 )
- @( if [ ! -d $(dst_dir)$(man_path_base)/man5 ]; then mkdir -p $(dst_dir)$(man_path_base)/man5; fi )
- @( cp man/$(OS)/ss5.passwd.5* $(dst_dir)$(man_path_base)/man5 )
- @( cp man/$(OS)/ss5.ha.5* $(dst_dir)$(man_path_base)/man5 )
- @( cp man/$(OS)/ss5.pam.5* $(dst_dir)$(man_path_base)/man5 )
- @( cp man/$(OS)/ss5.conf.5* $(dst_dir)$(man_path_base)/man5 )
+ @( if [ $(OS) = "FreeBSD" ] && [ ! -d $(ss5_man)/man1 ]; then mkdir -p $(ss5_man)/man1; fi )
+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.1* $(ss5_man)/man1/; \
+ else cp man/$(OS)/ss5.1* $(dst_dir)$(man_path_base)/man1/; fi )
+ @( if [ ! -d $(dst_dir)$(man_path_base)/man5 ]; then mkdir -p $(dst_dir)$(man_path_base)/man5/; fi )
+ @( if [ $(OS) = "FreeBSD" ] && [ ! -d $(ss5_man)/man5 ]; then mkdir -p $(ss5_man)/man5; fi )
+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.passwd.5* $(ss5_man)/man5/; \
+ else cp man/$(OS)/ss5.passwd.5* $(dst_dir)$(man_path_base)/man5/; fi )
+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.ha.5* $(ss5_man)/man5/; \
+ else cp man/$(OS)/ss5.ha.5* $(dst_dir)$(man_path_base)/man5/; fi )
+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.pam.5* $(ss5_man)/man5/; \
+ else cp man/$(OS)/ss5.pam.5* $(dst_dir)$(man_path_base)/man5/; fi )
+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.conf.5* $(ss5_man)/man5/; \
+ else cp man/$(OS)/ss5.conf.5* $(dst_dir)$(man_path_base)/man5/; fi )
@( if [ ! -d $(dst_dir)$(conf_path_base) ]; then mkdir -p $(dst_dir)$(conf_path_base); fi )
@( if [ ! -d $(dst_dir)$(conf_path_base)/ss5 ]; then mkdir -p $(dst_dir)$(conf_path_base)/ss5; fi )
@( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.conf ]; then cp conf/ss5.conf $(dst_dir)$(conf_path_base)/ss5; \
else cp conf/ss5.conf $(dst_dir)$(conf_path_base)/ss5/ss5.conf.rpmnew ; fi )
- @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.passwd ]; then cp conf/ss5.passwd $(dst_dir)$(conf_path_base)/ss5; \
- else cp conf/ss5.passwd $(dst_dir)$(conf_path_base)/ss5/ss5.passwd.rpmnew ; fi )
+ @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.passwd ]; then cp conf/ss5.passwd $(dst_dir)$(conf_path_base)/ss5; fi)
- @( if [ $(OS) = "Linux" ] || [ $(OS) = "FreeBSD" ]; then \
+ @( if [ $(OS) = "Linux" ]; then \
if [ ! -d $(dst_dir)/etc/pam.d ]; then mkdir -p $(dst_dir)/etc/pam.d; fi ; \
fi )
- @( if [ $(OS) = "Linux" ] || [ $(OS) = "FreeBSD" ]; then \
+ @( if [ $(OS) = "Linux" ]; then \
if [ ! -f $(dst_dir)/etc/pam.d/ss5 ]; then cp doc/pam/examples/ss5.pam $(dst_dir)/etc/pam.d/ss5; \
else cp doc/pam/examples/ss5.pam $(dst_dir)/etc/pam.d/ss5.rpmnew ; fi ; \
fi )
+ @( if [ $(OS) = "FreeBSD" ]; then \
+ if [ ! -d $(ss5_examples) ]; then mkdir -p $(ss5_examples); fi; \
+ if [ ! -f $(ss5_examples) ]; then cp doc/pam/examples/ss5.pam $(ss5_examples); \
+ cp doc/ldap/examples/* $(ss5_examples); \
+ rm -rf /usr/local/share/doc/ss5/examples/; \
+ fi; \
+ fi )
.PHONY : uninstall
@@ -108,29 +140,48 @@
@( if [ -d $(dst_dir)$(doc_path_base)/ss5 ]; then rm -rf $(dst_dir)$(doc_path_base)/ss5; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man1/ss5.1 ]; then rm -f $(dst_dir)$(man_path_base)/man1/ss5.1; fi )
+ @( if [ -f $(ss5_man)/man1/ss5.1 ]; then rm -f $(ss5_man)/man1/ss5.1; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5; fi )
- @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.ha.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.ha.5; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.passwd.5 ]; then rm -f $(ss5_man)/man5/ss5.passwd.5; fi )
+ @( if [ -f $(man_path_base)/man5/ss5.ha.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.ha.5; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.ha.5 ]; then rm -f $(ss5_man)/man5/ss5.ha.5; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.conf.5 ]; then rm -f $(ss5_man)/man5/ss5.conf.5; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.pam.5 ]; then rm -f $(ss5_man)/man5/ss5.pam.5; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man1/ss5.1.gz ]; then rm -f $(dst_dir)$(man_path_base)/man1/ss5.1.gz; fi )
+ @( if [ -f $(ss5_man)/man1/ss5.1.gz ]; then rm -f $(ss5_man)/man1/ss5.1.gz; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5.gz ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5.gz; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.passwd.5.gz ]; then rm -f $(ss5_man)/man5/ss5.passwd.5.gz; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.ha.5.gz ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.ha.5.gz; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.ha.5.gz ]; then rm -f $(ss5_man)/man5/ss5.ha.5.gz; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5.gz ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5.gz; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.conf.5.gz ]; then rm -f $(ss5_man)/man5/ss5.conf.5.gz; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5.gz ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5.gz; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.pam.5.gz ]; then rm -f $(ss5_man)/man5/ss5.pam.5.gz; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man1/ss5.1.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man1/ss5.1.bz2; fi )
+ @( if [ -f $(ss5_man)/man1/ss5.1.bz2 ]; then rm -f $(ss5_man)/man1/ss5.1.bz2; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5.bz2; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.passwd.5.bz2 ]; then rm -f $(ss5_man)/man5/ss5.passwd.5.bz2; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.ha.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.ha.5.bz2; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.ha.5.bz2 ]; then rm -f $(ss5_man)/man5/ss5.ha.5.bz2; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5.bz2; fi )
- @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5.bz2; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.conf.5.bz2 ]; then rm -f $(ss5_man)/man5/ss5.conf.5.bz2; fi )
+ @( if [ -f $(man_path_base)/man5/ss5.pam.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5.bz2; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.pam.5.bz2 ]; then rm -f $(ss5_man)/man5/ss5.pam.5.bz2; fi )
@( if [ -d $(dst_dir)$(conf_path_base)/ss5 ]; then rm -rf $(dst_dir)$(conf_path_base)/ss5; fi )
- @( if [ $(OS) = "Linux" ] || [ $(OS) = "FreeBSD" ]; then \
+ @( if [ $(OS) = "Linux" ] ; then \
if [ -f $(dst_dir)/etc/pam.d/ss5 ]; then rm -f $(dst_dir)/etc/pam.d/ss5; fi ; \
fi )
+ @( if [ $(OS) = "FreeBSD" ]; then \
+ if [ -d $(ss5_examples) ]; then rm -rf $(ss5_examples); fi ; \
+ fi )
+
@( if [ $(OS) = "Linux" ] || [ $(OS) = "FreeBSD" ]; then \
- if [ -f $(dst_dir)$(boot_path_base)/ss5 ]; then rm -f $(dst_dir)$(boot_path_base)/ss5; fi; \
+ if [ -f $(dst_dir)$(boot_path_base)/ss5 ]; then rm -rf $(dst_dir)$(boot_path_base)/ss5; fi; \
fi )
@( if [ $(OS) = "Linux" ]; then \
|