• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

UltraMonkey-L7 V3(multi-thread implementation)


Commit MetaInfo

Revision578be2b2415558b5ad8dfd59348143f343c3a12f (tree)
Time2013-07-19 16:21:01
AuthorHiroaki Nakano <nakano.hiroaki@nttc...>
CommiterHiroaki Nakano

Log Message

configure.inおよびMakefile.amよりFull Path指定を
排除。prefix等の組み込みconfigure, makeオプションが
反映されるようにした。
その結果、make installでインストールする場合、configure
でオプションを指定しなければすべて/usr/local配下に
インストールされるようになった。

上記修正のうえ、sample.crmおよびmanがrpmでインストールされない
問題を修正。
make installでパッケージに必要なすべてのファイルをインストール
するようにし、specファイルから個別インストールコマンドを排除。

Signed-off-by: Hiroaki Nakano <nakano.hiroaki@nttcom.co.jp>

Change Summary

Incremental Difference

--- a/configure.in
+++ b/configure.in
@@ -51,27 +51,27 @@ AC_FUNC_STRFTIME
5151 AC_CHECK_FUNCS([gethostname localtime_r memset])
5252
5353 # application-specific option
54-if test `uname -m` == "x86_64"; then
55- AC_SUBST( libdir, [/usr/lib64] )
56-else
57- AC_SUBST( libdir, [/usr/lib] )
58- AC_SUBST( CXXFLAGS, -march=i686 )
59-fi
60-AC_SUBST( includedir, [/usr/include] )
54+#if test `uname -m` == "x86_64"; then
55+# AC_SUBST( libdir, [/usr/lib64] )
56+#else
57+# AC_SUBST( libdir, [/usr/lib] )
58+# AC_SUBST( CXXFLAGS, -march=i686 )
59+#fi
60+#AC_SUBST( includedir, [${prefix}/include] )
6161
6262 AC_ARG_WITH(
6363 l7vs-moddir,
6464 [ --with-l7vs-moddir=DIR l7vs module is to be installed in DIR.
65- [default=LIBDIR/l7vs] ],
65+ [default=${libdir}/l7vs] ],
6666 [ l7vs_moddir="$withval" ],
6767 [ l7vs_moddir="${libdir}/l7vs" ]
6868 )
6969
7070 AC_ARG_WITH(
7171 l7vs-includedir,
72- [ --with-l7vs-includedir=DIR l7vs headerfile is to be installed in DIR.
72+ [ --with-l7vs-includedir=DIR l7vs headerfile is to be installed in DIR.
7373
74- [default=INCLUDEDIR/l7vs]
74+ [default=${includedir}/l7vs]
7575 ],
7676 [ l7vs_includedir="$withval" ],
7777 [ l7vs_includedir="${includedir}/l7vs" ]
@@ -80,9 +80,9 @@ AC_ARG_WITH(
8080 AC_ARG_WITH(
8181 l7vsadm-sockdir,
8282 [ --with-l7vsadm-sockdir=DIR l7vsadm sockfile PATH.
83- [default=/var/run/l7vs] ],
83+ [default=${localstatedir}/run/l7vs] ],
8484 [ l7vsadm_sockdir="$withval" ],
85- [ l7vsadm_sockdir="/var/run/l7vs" ]
85+ [ l7vsadm_sockdir="${localstatedir}/run/l7vs" ]
8686 )
8787
8888 AC_ARG_WITH(
@@ -96,13 +96,13 @@ AC_ARG_WITH(
9696 AC_ARG_WITH(
9797 l7vs-config-dir,
9898 [ --with-l7vs-config-dir=DIR l7vs configfile PATH.
99- [default=/etc/l7vs/l7vs.cf] ],
99+ [default=${sysconfdir}/l7vs] ],
100100 [ l7vs_config="$withval" ],
101- [ l7vs_config="/etc/l7vs/l7vs.cf" ]
101+ [ l7vs_config="${sysconfdir}/l7vs" ]
102102 )
103103
104104 AC_SUBST(CC,g++)
105-AC_SUBST(exec_prefix, [/usr] )
105+#AC_SUBST(exec_prefix, [/usr] )
106106 AC_SUBST(l7vsadm_sockdir)
107107 AC_SUBST(l7vs_moddir)
108108 AC_SUBST(l7vs_includedir)
@@ -118,6 +118,10 @@ AC_CONFIG_FILES([doc/Makefile]
118118 [doc/heartbeat-ra/Makefile]
119119 [doc/mibs/Makefile]
120120 [doc/man/Makefile]
121+ [doc/moduledevel/Makefile]
122+ [doc/moduledevel/sample/Makefile]
123+ [doc/moduledevel/sample/protocol/Makefile]
124+ [doc/moduledevel/sample/schedule/Makefile]
121125 [l7directord/Makefile]
122126 [l7vsd/Makefile]
123127 [l7vsd/init.d/Makefile]
@@ -125,6 +129,7 @@ AC_CONFIG_FILES([doc/Makefile]
125129 [l7vsd/module/protocol/Makefile]
126130 [l7vsd/module/schedule/Makefile]
127131 [l7vsd/src/Makefile]
132+ [l7vsd/include/Makefile]
128133 [Makefile])
129134
130135 AC_OUTPUT
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,2 +1,2 @@
11 AUTOMAKE_OPTIONS = foreign
2-SUBDIRS = conf sslfiles heartbeat-ra mibs man
2+SUBDIRS = conf sslfiles heartbeat-ra mibs moduledevel man
--- a/doc/conf/Makefile.am
+++ b/doc/conf/Makefile.am
@@ -1,12 +1,12 @@
11 AUTOMAKE_OPTIONS = foreign
22
33 L7VS_CONF_DIR = @l7vs_config@
4-L7DIRECTORD_CONFDIR = /etc/ha.d/conf
5-L7VS_SSL_CONFDIR = /etc/l7vs/sslproxy
6-L7DIRECTORD_LOGROTATEDIR = /etc/logrotate.d
4+L7DIRECTORD_CONFDIR = @sysconfdir@/ha.d/conf
5+L7VS_SSL_CONFDIR = @sysconfdir@/l7vs/sslproxy
6+L7DIRECTORD_LOGROTATEDIR = @sysconfdir@/logrotate.d
77
88 install:
9- $(INSTALL) -b -m 644 -D ./l7vs.cf $(L7VS_CONF_DIR)
9+ $(INSTALL) -b -m 644 -D ./l7vs.cf $(L7VS_CONF_DIR)/l7vs.cf
1010 $(INSTALL) -m 644 -D ./l7directord.cf.sample $(L7DIRECTORD_CONFDIR)/l7directord.cf.sample
1111 $(INSTALL) -b -m 644 -D ./sslproxy.target.cf $(L7VS_SSL_CONFDIR)/sslproxy.target.cf
1212 $(INSTALL) -m 644 -D ./l7directord $(L7DIRECTORD_LOGROTATEDIR)/l7directord
--- a/doc/heartbeat-ra/Makefile.am
+++ b/doc/heartbeat-ra/Makefile.am
@@ -1,7 +1,7 @@
11 AUTOMAKE_OPTIONS = foreign
22
33 UML7_VERSION = @ultramonkeyl7_version@
4-HB2_TEMPDIR = /usr/share/doc/$(UML7_VERSION)/heartbeat-ra
4+HB2_TEMPDIR = @prefix@/share/doc/$(UML7_VERSION)/heartbeat-ra
55
66 install:
77 $(INSTALL) -b -m 644 -D ./logd.cf $(HB2_TEMPDIR)/logd.cf
--- a/doc/mibs/Makefile.am
+++ b/doc/mibs/Makefile.am
@@ -1,7 +1,7 @@
11 AUTOMAKE_OPTIONS = foreign
22
33 UML7_VERSION = @ultramonkeyl7_version@
4-L7VS_SNMP_MIBSDIR= /usr/share/doc/$(UML7_VERSION)/mibs
4+L7VS_SNMP_MIBSDIR= @prefix@/share/doc/$(UML7_VERSION)/mibs
55
66 install:
77 $(INSTALL) -b -m 644 -D ./ULTRAMONKEY-L7-MIB.txt $(L7VS_SNMP_MIBSDIR)/ULTRAMONKEY-L7-MIB.txt
--- /dev/null
+++ b/doc/moduledevel/Makefile.am
@@ -0,0 +1,2 @@
1+AUTOMAKE_OPTIONS = foreign
2+SUBDIRS = sample
--- /dev/null
+++ b/doc/moduledevel/sample/Makefile.am
@@ -0,0 +1,2 @@
1+AUTOMAKE_OPTIONS = foreign
2+SUBDIRS = protocol schedule
--- a/doc/moduledevel/sample/protocol/Makefile.am
+++ b/doc/moduledevel/sample/protocol/Makefile.am
@@ -1,24 +1,13 @@
11 AUTOMAKE_OPTIONS = foreign
2-L7VS_MODDIR = @l7vs_moddir@
3-L7VS_INCLUDEDIR = @l7vs_includedir@
4-MAX_BUFFER_SIZE = @l7vs_max_buffer_size@
52
6-AM_CPPFLAGS = \
7- -g -O2 -fno-strict-aliasing -Wall -Werror -fPIC -pthread \
8- -I$(L7VS_INCLUDEDIR) \
9- -DMAX_BUFFER_SIZE=$(MAX_BUFFER_SIZE)
10-
11-lib_LTLIBRARIES = \
12- libprotomod_simple.la
13-
14-libprotomod_simple_la_SOURCES = \
15- protocol_module_base.h \
16- http_protocol_module_base.h \
17- http_protocol_module_base.cpp \
18- protocol_module_simple.cpp
3+UML7_VERSION = @ultramonkeyl7_version@
4+MODDEV_TEMPDIR = @prefix@/share/doc/${UML7_VERSION}/moduledevel
195
206 install:
21- cp ./.libs/libprotomod_simple.so ./.libs/protomod_simple.so && \
22- $(INSTALL) -m 755 -d $(L7VS_MODDIR)
23- $(INSTALL) -m 755 -D \
24- ./.libs/protomod_simple.so $(L7VS_MODDIR)
7+ install -c -m 644 -D ./README ${MODDEV_TEMPDIR}/sample/protocol/README
8+ install -c -m 644 -D ./Makefile.am.sample ${MODDEV_TEMPDIR}/sample/protocol/Makefile.am
9+ install -c -m 644 -D ./configure.in ${MODDEV_TEMPDIR}/sample/protocol/configure.in
10+ install -c -m 644 -D ./http_protocol_module_base.cpp ${MODDEV_TEMPDIR}/sample/protocol/http_protocol_module_base.cpp
11+ install -c -m 644 -D ./http_protocol_module_base.h ${MODDEV_TEMPDIR}/sample/protocol/http_protocol_module_base.h
12+ install -c -m 644 -D ./protocol_module_simple.cpp ${MODDEV_TEMPDIR}/sample/protocol/protocol_module_simple.cpp
13+ install -c -m 644 -D ./protocol_module_simple.h ${MODDEV_TEMPDIR}/sample/protocol/protocol_module_simple.h
--- /dev/null
+++ b/doc/moduledevel/sample/protocol/Makefile.am.sample
@@ -0,0 +1,24 @@
1+AUTOMAKE_OPTIONS = foreign
2+L7VS_MODDIR = @l7vs_moddir@
3+L7VS_INCLUDEDIR = @l7vs_includedir@
4+MAX_BUFFER_SIZE = @l7vs_max_buffer_size@
5+
6+AM_CPPFLAGS = \
7+ -g -O2 -fno-strict-aliasing -Wall -Werror -fPIC -pthread \
8+ -I$(L7VS_INCLUDEDIR) \
9+ -DMAX_BUFFER_SIZE=$(MAX_BUFFER_SIZE)
10+
11+lib_LTLIBRARIES = \
12+ libprotomod_simple.la
13+
14+libprotomod_simple_la_SOURCES = \
15+ protocol_module_base.h \
16+ http_protocol_module_base.h \
17+ http_protocol_module_base.cpp \
18+ protocol_module_simple.cpp
19+
20+install:
21+ cp ./.libs/libprotomod_simple.so ./.libs/protomod_simple.so && \
22+ $(INSTALL) -m 755 -d $(L7VS_MODDIR)
23+ $(INSTALL) -m 755 -D \
24+ ./.libs/protomod_simple.so $(L7VS_MODDIR)
--- a/doc/moduledevel/sample/schedule/Makefile.am
+++ b/doc/moduledevel/sample/schedule/Makefile.am
@@ -1,25 +1,11 @@
11 AUTOMAKE_OPTIONS = foreign
2-L7VS_MODDIR = @l7vs_moddir@
3-L7VS_INCLUDEDIR = @l7vs_includedir@
4-MAX_BUFFER_SIZE = @l7vs_max_buffer_size@
5-AM_CPPFLAGS = \
6- -g -O2 -fno-strict-aliasing -Wall -Werror -fPIC -pthread \
7- -I$(L7VS_INCLUDEDIR) \
8- -DMAX_BUFFER_SIZE=$(MAX_BUFFER_SIZE)
92
10-lib_LTLIBRARIES = \
11- libsched_rnd.la
12-
13-libsched_rnd_la_SOURCES = \
14- schedule_module_base.h \
15- schedule_module_rnd.h \
16- schedule_module_rnd.cpp
17-
18-libsched_rnd_la_LIBADD = -lrt -lboost_thread-mt
3+UML7_VERSION = @ultramonkeyl7_version@
4+MODDEV_TEMPDIR = @prefix@/share/doc/${UML7_VERSION}/moduledevel
195
206 install:
21- cp ./.libs/libsched_rnd.so ./.libs/sched_rnd.so && \
22- $(INSTALL) -m 755 -d $(L7VS_MODDIR)
23- $(INSTALL) -m 755 -D \
24- ./.libs/sched_rnd.so \
25- $(L7VS_MODDIR)
7+ install -c -m 644 -D ./README ${MODDEV_TEMPDIR}/sample/schedule/README
8+ install -c -m 644 -D ./Makefile.am.sample ${MODDEV_TEMPDIR}/sample/schedule/Makefile.am
9+ install -c -m 644 -D ./configure.in ${MODDEV_TEMPDIR}/sample/schedule/configure.in
10+ install -c -m 644 -D ./schedule_module_rnd.cpp ${MODDEV_TEMPDIR}/sample/schedule/schedule_module_rnd.cpp
11+ install -c -m 644 -D ./schedule_module_rnd.h ${MODDEV_TEMPDIR}/sample/schedule/schedule_module_rnd.h
--- /dev/null
+++ b/doc/moduledevel/sample/schedule/Makefile.am.sample
@@ -0,0 +1,25 @@
1+AUTOMAKE_OPTIONS = foreign
2+L7VS_MODDIR = @l7vs_moddir@
3+L7VS_INCLUDEDIR = @l7vs_includedir@
4+MAX_BUFFER_SIZE = @l7vs_max_buffer_size@
5+AM_CPPFLAGS = \
6+ -g -O2 -fno-strict-aliasing -Wall -Werror -fPIC -pthread \
7+ -I$(L7VS_INCLUDEDIR) \
8+ -DMAX_BUFFER_SIZE=$(MAX_BUFFER_SIZE)
9+
10+lib_LTLIBRARIES = \
11+ libsched_rnd.la
12+
13+libsched_rnd_la_SOURCES = \
14+ schedule_module_base.h \
15+ schedule_module_rnd.h \
16+ schedule_module_rnd.cpp
17+
18+libsched_rnd_la_LIBADD = -lrt -lboost_thread-mt
19+
20+install:
21+ cp ./.libs/libsched_rnd.so ./.libs/sched_rnd.so && \
22+ $(INSTALL) -m 755 -d $(L7VS_MODDIR)
23+ $(INSTALL) -m 755 -D \
24+ ./.libs/sched_rnd.so \
25+ $(L7VS_MODDIR)
--- a/doc/sslfiles/Makefile.am
+++ b/doc/sslfiles/Makefile.am
@@ -1,6 +1,6 @@
11 AUTOMAKE_OPTIONS = foreign
22
3-L7VS_SSL_CONFDIR = /etc/l7vs/sslproxy
3+L7VS_SSL_CONFDIR = @sysconfdir@/l7vs/sslproxy
44
55 install:
66 $(INSTALL) -b -m 644 -D ./root.pem $(L7VS_SSL_CONFDIR)/root.pem
--- a/l7directord/Makefile.am
+++ b/l7directord/Makefile.am
@@ -1,7 +1,7 @@
11 AUTOMAKE_OPTIONS = foreign
22
33 SBINDIR = @sbindir@
4-RCDIR = /etc/init.d
4+RCDIR = @sysconfdir@/init.d
55
66 install:
77 $(INSTALL) -m 755 -D ./l7directord $(SBINDIR)/l7directord
--- a/l7vsd/Makefile.am
+++ b/l7vsd/Makefile.am
@@ -1,2 +1,2 @@
11 AUTOMAKE_OPTIONS = foreign
2-SUBDIRS = init.d src module
2+SUBDIRS = init.d src module include
--- /dev/null
+++ b/l7vsd/include/Makefile.am
@@ -0,0 +1,19 @@
1+AUTOMAKE_OPTIONS = foreign
2+
3+L7VS_INCLUDEDIR = @l7vs_includedir@
4+
5+install:
6+ install -c -m 644 -D ./protocol_module_base.h ${L7VS_INCLUDEDIR}/protocol_module_base.h
7+ install -c -m 644 -D ./schedule_module_base.h ${L7VS_INCLUDEDIR}/schedule_module_base.h
8+ install -c -m 644 -D ./module_base.h ${L7VS_INCLUDEDIR}/module_base.h
9+ install -c -m 644 -D ./utility.h ${L7VS_INCLUDEDIR}/utility.h
10+ install -c -m 644 -D ./logger.h ${L7VS_INCLUDEDIR}/logger.h
11+ install -c -m 644 -D ./logger_enum.h ${L7VS_INCLUDEDIR}/logger_enum.h
12+ install -c -m 644 -D ./trapmessage.h ${L7VS_INCLUDEDIR}/trapmessage.h
13+ install -c -m 644 -D ./error_code.h ${L7VS_INCLUDEDIR}/error_code.h
14+ install -c -m 644 -D ./atomic.h ${L7VS_INCLUDEDIR}/atomic.h
15+ install -c -m 644 -D ./wrlock.h ${L7VS_INCLUDEDIR}/wrlock.h
16+ install -c -m 644 -D ./replication.h ${L7VS_INCLUDEDIR}/replication.h
17+ install -c -m 644 -D ./realserver.h ${L7VS_INCLUDEDIR}/realserver.h
18+ install -c -m 644 -D ./realserver_element.h ${L7VS_INCLUDEDIR}/realserver_element.h
19+ install -c -m 644 -D ./endpoint.h ${L7VS_INCLUDEDIR}/endpoint.h
--- a/l7vsd/init.d/Makefile.am
+++ b/l7vsd/init.d/Makefile.am
@@ -1,4 +1,4 @@
11 AUTOMAKE_OPTIONS = foreign
22
33 install:
4- $(INSTALL) -m 755 -D ./l7vsd /etc/init.d/l7vsd
4+ $(INSTALL) -m 755 -D ./l7vsd @sysconfdir@/init.d/l7vsd
--- a/ultramonkeyl7.spec
+++ b/ultramonkeyl7.spec
@@ -2,7 +2,7 @@
22 %define l7vs_logdir %{_localstatedir}/log/l7vs
33 %define l7vs_includedir %{_includedir}/l7vs
44 %define l7vsadm_sockdir %{_localstatedir}/run/l7vs
5-%define l7vs_maxvs 64
5+%define l7vs_buffer_size 4096
66
77 Summary: The Layer-7 Virtual Server
88 Name: ultramonkeyl7
@@ -28,9 +28,9 @@ Requires: perl-Net-SSLeay
2828 Requires: perl-IO-Socket-SSL
2929 Requires: perl-IO-Socket-INET6
3030
31-%define hb2_tempdir /usr/share/doc/%{name}-%{version}-%{release}/heartbeat-ra
32-%define mibs_tempdir /usr/share/doc/%{name}-%{version}-%{release}/mibs
33-%define moduledevel_tempdir /usr/share/doc/%{name}-%{version}-%{release}/moduledevel
31+%define hb2_tempdir /usr/share/doc/%{name}-%{version}/heartbeat-ra
32+%define mibs_tempdir /usr/share/doc/%{name}-%{version}/mibs
33+%define moduledevel_tempdir /usr/share/doc/%{name}-%{version}/moduledevel
3434
3535 %description
3636 Layer-7 load balancing daemon
@@ -48,7 +48,15 @@ for UltraMonkeyl7's module.
4848 %setup -q
4949
5050 %build
51-%configure
51+%configure \
52+ --prefix=${RPM_BUILD_ROOT}%{_prefix} \
53+ --sbindir=${RPM_BUILD_ROOT}%{_sbindir} \
54+ --sysconfdir=${RPM_BUILD_ROOT}%{_sysconfdir} \
55+ --localstatedir=${RPM_BUILD_ROOT}%{_localstatedir} \
56+ --mandir=${RPM_BUILD_ROOT}%{_mandir} \
57+ --includedir=${RPM_BUILD_ROOT}%{_includedir} \
58+ --libdir=${RPM_BUILD_ROOT}%{_libdir}
59+
5260 make
5361
5462 %install
@@ -64,75 +72,11 @@ mkdir -p ${RPM_BUILD_ROOT}%{l7vs_logdir}
6472 mkdir -p ${RPM_BUILD_ROOT}%{l7vsadm_sockdir}
6573 mkdir -p ${RPM_BUILD_ROOT}%{hb2_tempdir}
6674 mkdir -p ${RPM_BUILD_ROOT}%{mibs_tempdir}
75+mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
6776 mkdir -p ${RPM_BUILD_ROOT}%{moduledevel_tempdir}
68-mkdir -p ${RPM_BUILD_ROOT}%{moduledevel_tempdir}/sample
69-mkdir -p ${RPM_BUILD_ROOT}%{l7vs_includedir}
70-
71-# bin
72-install -c -m 755 -D l7vsd/src/l7vsd ${RPM_BUILD_ROOT}%{_sbindir}/l7vsd
73-install -c -m 755 -D l7vsd/src/l7vsadm ${RPM_BUILD_ROOT}%{_sbindir}/l7vsadm
74-install -c -m 755 -D l7directord/l7directord ${RPM_BUILD_ROOT}%{_sbindir}/l7directord
75-
76-# lib
77-install -c -m 755 -D l7vsd/module/protocol/.libs/libprotomod_sslid.so ${RPM_BUILD_ROOT}%{l7vs_moddir}/protomod_sslid.so
78-install -c -m 755 -D l7vsd/module/protocol/.libs/libprotomod_ip.so ${RPM_BUILD_ROOT}%{l7vs_moddir}/protomod_ip.so
79-install -c -m 755 -D l7vsd/module/protocol/.libs/libprotomod_sessionless.so ${RPM_BUILD_ROOT}%{l7vs_moddir}/protomod_sessionless.so
80-install -c -m 755 -D l7vsd/module/schedule/.libs/libsched_lc.so ${RPM_BUILD_ROOT}%{l7vs_moddir}/sched_lc.so
81-install -c -m 755 -D l7vsd/module/schedule/.libs/libsched_rr.so ${RPM_BUILD_ROOT}%{l7vs_moddir}/sched_rr.so
82-install -c -m 755 -D l7vsd/module/schedule/.libs/libsched_wrr.so ${RPM_BUILD_ROOT}%{l7vs_moddir}/sched_wrr.so
83-
84-# initscripts
85-install -c -m 755 -D l7directord/init.d/l7directord ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d/l7directord
86-install -c -m 755 -D l7vsd/init.d/l7vsd ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d/l7vsd
87-
88-# config
89-install -c -m 644 -D doc/conf/l7vs.cf ${RPM_BUILD_ROOT}%{_sysconfdir}/l7vs/l7vs.cf
90-install -c -m 644 -D doc/conf/l7directord.cf.sample ${RPM_BUILD_ROOT}%{_sysconfdir}/ha.d/conf/l7directord.cf.sample
91-install -c -m 644 -D doc/conf/sslproxy.target.cf ${RPM_BUILD_ROOT}%{_sysconfdir}/l7vs/sslproxy/sslproxy.target.cf
92-install -c -m 644 -D doc/sslfiles/root.pem ${RPM_BUILD_ROOT}%{_sysconfdir}/l7vs/sslproxy/root.pem
93-install -c -m 644 -D doc/sslfiles/server.pem ${RPM_BUILD_ROOT}%{_sysconfdir}/l7vs/sslproxy/server.pem
94-install -c -m 644 -D doc/sslfiles/dh512.pem ${RPM_BUILD_ROOT}%{_sysconfdir}/l7vs/sslproxy/dh512.pem
95-install -c -m 644 -D doc/sslfiles/passwd.txt ${RPM_BUILD_ROOT}%{_sysconfdir}/l7vs/sslproxy/passwd.txt
96-
97-# heartbeat2 config
98-install -c -m 644 -D doc/heartbeat-ra/logd.cf ${RPM_BUILD_ROOT}%{hb2_tempdir}/logd.cf
99-install -c -m 644 -D doc/heartbeat-ra/ha.cf ${RPM_BUILD_ROOT}%{hb2_tempdir}/ha.cf
100-install -c -m 600 -D doc/heartbeat-ra/authkeys ${RPM_BUILD_ROOT}%{hb2_tempdir}/authkeys
101-install -c -m 600 -D doc/heartbeat-ra/cib.xml-sample ${RPM_BUILD_ROOT}%{hb2_tempdir}/cib.xml
102-install -c -m 755 -D doc/heartbeat-ra/L7vsd ${RPM_BUILD_ROOT}%{hb2_tempdir}/L7vsd
103-install -c -m 755 -D doc/heartbeat-ra/L7directord ${RPM_BUILD_ROOT}%{hb2_tempdir}/L7directord
104-install -c -m 755 -D doc/heartbeat-ra/VIPcheck ${RPM_BUILD_ROOT}%{hb2_tempdir}/VIPcheck
105-
106-# mib file
107-install -c -m 644 -D doc/mibs/ULTRAMONKEY-L7-MIB.txt ${RPM_BUILD_ROOT}%{mibs_tempdir}/ULTRAMONKEY-L7-MIB.txt
108-
109-# header for devel
110-install -c -m 644 -D l7vsd/include/protocol_module_base.h ${RPM_BUILD_ROOT}%{l7vs_includedir}/protocol_module_base.h
111-install -c -m 644 -D l7vsd/include/schedule_module_base.h ${RPM_BUILD_ROOT}%{l7vs_includedir}/schedule_module_base.h
112-install -c -m 644 -D l7vsd/include/module_base.h ${RPM_BUILD_ROOT}%{l7vs_includedir}/module_base.h
113-install -c -m 644 -D l7vsd/include/utility.h ${RPM_BUILD_ROOT}%{l7vs_includedir}/utility.h
114-install -c -m 644 -D l7vsd/include/logger.h ${RPM_BUILD_ROOT}%{l7vs_includedir}/logger.h
115-install -c -m 644 -D l7vsd/include/logger_enum.h ${RPM_BUILD_ROOT}%{l7vs_includedir}/logger_enum.h
116-install -c -m 644 -D l7vsd/include/trapmessage.h ${RPM_BUILD_ROOT}%{l7vs_includedir}/trapmessage.h
117-install -c -m 644 -D l7vsd/include/error_code.h ${RPM_BUILD_ROOT}%{l7vs_includedir}/error_code.h
118-install -c -m 644 -D l7vsd/include/atomic.h ${RPM_BUILD_ROOT}%{l7vs_includedir}/atomic.h
119-install -c -m 644 -D l7vsd/include/wrlock.h ${RPM_BUILD_ROOT}%{l7vs_includedir}/wrlock.h
120-install -c -m 644 -D l7vsd/include/replication.h ${RPM_BUILD_ROOT}%{l7vs_includedir}/replication.h
121-install -c -m 644 -D l7vsd/include/realserver.h ${RPM_BUILD_ROOT}%{l7vs_includedir}/realserver.h
122-install -c -m 644 -D l7vsd/include/realserver_element.h ${RPM_BUILD_ROOT}%{l7vs_includedir}/realserver_element.h
123-install -c -m 644 -D l7vsd/include/endpoint.h ${RPM_BUILD_ROOT}%{l7vs_includedir}/endpoint.h
124-install -c -m 644 -D doc/moduledevel/sample/protocol/README ${RPM_BUILD_ROOT}%{moduledevel_tempdir}/sample/protocol/README
125-install -c -m 644 -D doc/moduledevel/sample/protocol/Makefile.am ${RPM_BUILD_ROOT}%{moduledevel_tempdir}/sample/protocol/Makefile.am
126-install -c -m 644 -D doc/moduledevel/sample/protocol/configure.in ${RPM_BUILD_ROOT}%{moduledevel_tempdir}/sample/protocol/configure.in
127-install -c -m 644 -D doc/moduledevel/sample/protocol/http_protocol_module_base.cpp ${RPM_BUILD_ROOT}%{moduledevel_tempdir}/sample/protocol/http_protocol_module_base.cpp
128-install -c -m 644 -D doc/moduledevel/sample/protocol/http_protocol_module_base.h ${RPM_BUILD_ROOT}%{moduledevel_tempdir}/sample/protocol/http_protocol_module_base.h
129-install -c -m 644 -D doc/moduledevel/sample/protocol/protocol_module_simple.cpp ${RPM_BUILD_ROOT}%{moduledevel_tempdir}/sample/protocol/protocol_module_simple.cpp
130-install -c -m 644 -D doc/moduledevel/sample/protocol/protocol_module_simple.h ${RPM_BUILD_ROOT}%{moduledevel_tempdir}/sample/protocol/protocol_module_simple.h
131-install -c -m 644 -D doc/moduledevel/sample/schedule/README ${RPM_BUILD_ROOT}%{moduledevel_tempdir}/sample/schedule/README
132-install -c -m 644 -D doc/moduledevel/sample/schedule/Makefile.am ${RPM_BUILD_ROOT}%{moduledevel_tempdir}/sample/schedule/Makefile.am
133-install -c -m 644 -D doc/moduledevel/sample/schedule/configure.in ${RPM_BUILD_ROOT}%{moduledevel_tempdir}/sample/schedule/configure.in
134-install -c -m 644 -D doc/moduledevel/sample/schedule/schedule_module_rnd.cpp ${RPM_BUILD_ROOT}%{moduledevel_tempdir}/sample/schedule/schedule_module_rnd.cpp
135-install -c -m 644 -D doc/moduledevel/sample/schedule/schedule_module_rnd.h ${RPM_BUILD_ROOT}%{moduledevel_tempdir}/sample/schedule/schedule_module_rnd.h
77+mkdir -p ${RPM_BUILD_ROOT}%{_includedir}
78+
79+make install
13680
13781 %clean
13882 rm -rf $RPM_BUILD_ROOT
@@ -153,18 +97,21 @@ fi
15397 %defattr(-, root, root, 0755)
15498 %{_sbindir}/*
15599 %{l7vs_moddir}/*
156-%{_sysconfdir}/rc.d/init.d/*
100+%{_sysconfdir}/init.d/*
157101 %dir %{l7vs_moddir}
158102 %dir %{l7vs_logdir}
159-%config(noreplace) %{_sysconfdir}/l7vs/*
160-%config(noreplace) %{_sysconfdir}/ha.d/*
161103 %dir %{_sysconfdir}/l7vs
162104 %dir %{_sysconfdir}/ha.d
105+%config(noreplace) %{_sysconfdir}/l7vs/*
106+%config(noreplace) %{_sysconfdir}/ha.d/*
163107 %dir %{l7vsadm_sockdir}
108+%dir %{_docdir}/%{name}-%{version}
164109 %dir %{hb2_tempdir}
165-%config(noreplace) %{hb2_tempdir}/*
110+%doc %{hb2_tempdir}/*
166111 %dir %{mibs_tempdir}
167-%config(noreplace) %{mibs_tempdir}/*
112+%doc %{mibs_tempdir}/*
113+%{_mandir}/man8/*
114+%config(noreplace) %{_sysconfdir}/logrotate.d/l7directord
168115
169116 %files devel
170117 %defattr(-, root, root, 0755)