source: freewrt/package/collectd/Makefile

freewrt_2_0
Last change on this file was 5d9f1ed, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

more init script fixes

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@1009 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 2.7 KB
Line 
1# $FreeWRT$
2#-
3# This file is part of the FreeWRT project. FreeWRT is copyrighted
4# material, please see the LICENCE file in the top-level directory
5# or at http://www.freewrt.org/licence for details.
6
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:= collectd
10PKG_VERSION:= 3.9.4
11PKG_RELEASE:= 2
12PKG_MD5SUM:= 1e5cab09394e0e5a1e5b3f8c923858a3
13PKG_INIT:= 75
14
15PKG_SOURCE_URL:= http://verplant.org/collectd/files
16
17include $(TOPDIR)/mk/package.mk
18
19$(eval $(call PKG_template,COLLECTD,collectd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21ifneq ($(FWRT_PACKAGE_COLLECTD_CPU),y)
22DISABLE_CPU:=--disable-cpu
23endif
24ifneq ($(FWRT_PACKAGE_COLLECTD_LOAD),y)
25DISABLE_LOAD:=--disable-load
26endif
27ifneq ($(FWRT_PACKAGE_COLLECTD_MEMORY),y)
28DISABLE_MEMORY:=--disable-memory
29endif
30ifneq ($(FWRT_PACKAGE_COLLECTD_PING),y)
31DISABLE_PING:=--disable-ping
32endif
33ifneq ($(FWRT_PACKAGE_COLLECTD_TRAFFIC),y)
34DISABLE_TRAFFIC:=--disable-traffic
35endif
36
37$(WRKBUILD)/.configured: $(WRKBUILD)/.prepared
38 (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
39 $(TARGET_CONFIGURE_OPTS) \
40 CFLAGS="$(strip $(TARGET_CFLAGS))" \
41 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
42 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
43 ./configure \
44 --target=$(GNU_TARGET_NAME) \
45 --host=$(GNU_TARGET_NAME) \
46 --build=$(GNU_HOST_NAME) \
47 --program-prefix="" \
48 --program-suffix="" \
49 --prefix=/usr \
50 --exec-prefix=/usr \
51 --bindir=/usr/bin \
52 --datadir=/usr/share \
53 --includedir=/usr/include \
54 --infodir=/usr/share/info \
55 --libdir=/usr/lib \
56 --libexecdir=/usr/lib \
57 --localstatedir=/var \
58 --mandir=/usr/share/man \
59 --sbindir=/usr/sbin \
60 --sysconfdir=/etc \
61 --enable-shared \
62 --disable-static \
63 --disable-debug \
64 $(DISABLE_CPU) \
65 $(DISABLE_LOAD) \
66 $(DISABLE_MEMORY) \
67 $(DISABLE_PING) \
68 $(DISABLE_TRAFFIC) \
69 --disable-cpufreq \
70 --disable-disk \
71 --disable-hddtemp \
72 --disable-nfs \
73 --disable-processes \
74 --disable-sensors \
75 --disable-serial \
76 --disable-swap \
77 --disable-tape \
78 --disable-users \
79 --disable-apache \
80 );
81 touch $@
82
83$(WRKBUILD)/.built: $(WRKBUILD)/.configured
84 $(MAKE) -C $(WRKBUILD)
85 mkdir -p $(WRKINST)
86 $(MAKE) -C $(WRKBUILD) \
87 DESTDIR="$(WRKINST)" \
88 install
89 touch $@
90
91$(IPKG_COLLECTD):
92 install -d -m0755 $(IDIR_COLLECTD)/etc/init.d
93 install -d -m0755 $(IDIR_COLLECTD)/usr/sbin
94 install -d -m0755 $(IDIR_COLLECTD)/usr/lib/collectd
95 install -d -m0755 $(IDIR_COLLECTD)/var/lib/collectd
96 install -d -m0755 $(IDIR_COLLECTD)/var/run
97 $(INSTALL_BIN) ./files/collectd.init \
98 $(IDIR_COLLECTD)/etc/init.d/S$(PKG_INIT)collectd
99 $(CP) $(WRKINST)/usr/sbin/collectd $(IDIR_COLLECTD)/usr/sbin/
100 $(CP) $(WRKINST)/usr/lib/collectd/*.so $(IDIR_COLLECTD)/usr/lib/collectd/
101 $(RSTRIP) $(IDIR_COLLECTD)
102 $(IPKG_BUILD) $(IDIR_COLLECTD) $(PACKAGE_DIR)
Note: See TracBrowser for help on using the repository browser.