source: freewrt/package/lighttpd/Makefile@ 8e47882

freewrt_1_0 freewrt_2_0
Last change on this file since 8e47882 was d419478, checked in by Thorsten Glaser <tg@…>, 19 years ago
  • whitespace cleanup, while here
  • move WRKDIR and DISTFILES definition into PKG_template
  • define WRKDIR via parent BUILD_DIR instead of going up from WRKSRC
  • use a sub-directory as WRKDIR, like BSD
  • rename PKG_BUILD_DIR into WRKBUILD
  • define WRKBUILD relative via WRKDIR
  • rename PKG_INSTALL_DIR into WRKINST
  • fix a few dependencies
  • make use of common cases in the definition of WRKBUILD and WRKINST, removing many redundant lines
  • use WRKDIR instead of BUILD_DIR in places where the latter was used previously
  • while here, remove PKG_CAT stuff

this only affects packages, for now

git-svn-id: svn://www.freewrt.org/trunk/freewrt@303 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 5.4 KB
Line 
1# $Id: Makefile 3720 2006-05-01 11:29:52Z nico $
2
3include $(TOPDIR)/rules.mk
4
5PKG_NAME:=lighttpd
6PKG_VERSION:=1.4.11
7PKG_RELEASE:=1
8PKG_MD5SUM:=f55eebb9815c94a7de35906bb557ecd3
9
10PKG_SOURCE_URL:=http://www.lighttpd.net/download/
11PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12
13
14include $(TOPDIR)/package/rules.mk
15
16define PKG_mod_template
17
18$$(IPKG_$(1)):
19 install -d -m0755 $$(IDIR_$(1))/usr/lib/lighttpd
20 install -m0755 $(WRKINST)/usr/lib/lighttpd/mod_$(2).so $$(IDIR_$(1))/usr/lib/lighttpd/
21 $(RSTRIP) $$(IDIR_$(1))
22 $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
23
24endef
25
26$(eval $(call PKG_template,LIGHTTPD,lighttpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
27$(eval $(call PKG_template,LIGHTTPD_MOD_ACCESSLOG,lighttpd-mod-accesslog,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
28$(eval $(call PKG_template,LIGHTTPD_MOD_ALIAS,lighttpd-mod-alias,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
29$(eval $(call PKG_template,LIGHTTPD_MOD_AUTH,lighttpd-mod-auth,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
30$(eval $(call PKG_template,LIGHTTPD_MOD_CGI,lighttpd-mod-cgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
31$(eval $(call PKG_template,LIGHTTPD_MOD_EVASIVE,lighttpd-mod-evasive,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
32$(eval $(call PKG_template,LIGHTTPD_MOD_EXPIRE,lighttpd-mod-expire,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
33$(eval $(call PKG_template,LIGHTTPD_MOD_FASTCGI,lighttpd-mod-fastcgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
34$(eval $(call PKG_template,LIGHTTPD_MOD_PROXY,lighttpd-mod-proxy,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
35$(eval $(call PKG_template,LIGHTTPD_MOD_REDIRECT,lighttpd-mod-redirect,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
36$(eval $(call PKG_template,LIGHTTPD_MOD_REWRITE,lighttpd-mod-rewrite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
37$(eval $(call PKG_template,LIGHTTPD_MOD_SETENV,lighttpd-mod-setenv,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
38$(eval $(call PKG_template,LIGHTTPD_MOD_SIMPLE_VHOST,lighttpd-mod-simple-vhost,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
39$(eval $(call PKG_template,LIGHTTPD_MOD_SSI,lighttpd-mod-ssi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
40$(eval $(call PKG_template,LIGHTTPD_MOD_STATUS,lighttpd-mod-status,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
41$(eval $(call PKG_template,LIGHTTPD_MOD_USERTRACK,lighttpd-mod-usertrack,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
42$(eval $(call PKG_template,LIGHTTPD_MOD_WEBDAV,lighttpd-mod-webdav,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
43
44$(eval $(call PKG_mod_template,LIGHTTPD_MOD_ACCESSLOG,accesslog))
45$(eval $(call PKG_mod_template,LIGHTTPD_MOD_ALIAS,alias))
46$(eval $(call PKG_mod_template,LIGHTTPD_MOD_AUTH,auth))
47$(eval $(call PKG_mod_template,LIGHTTPD_MOD_CGI,cgi))
48$(eval $(call PKG_mod_template,LIGHTTPD_MOD_EVASIVE,evasive))
49$(eval $(call PKG_mod_template,LIGHTTPD_MOD_EXPIRE,expire))
50$(eval $(call PKG_mod_template,LIGHTTPD_MOD_FASTCGI,fastcgi))
51$(eval $(call PKG_mod_template,LIGHTTPD_MOD_PROXY,proxy))
52$(eval $(call PKG_mod_template,LIGHTTPD_MOD_REDIRECT,redirect))
53$(eval $(call PKG_mod_template,LIGHTTPD_MOD_REWRITE,rewrite))
54$(eval $(call PKG_mod_template,LIGHTTPD_MOD_SETENV,setenv))
55$(eval $(call PKG_mod_template,LIGHTTPD_MOD_SIMPLE_VHOST,simple_vhost))
56$(eval $(call PKG_mod_template,LIGHTTPD_MOD_SSI,ssi))
57$(eval $(call PKG_mod_template,LIGHTTPD_MOD_STATUS,status))
58$(eval $(call PKG_mod_template,LIGHTTPD_MOD_USERTRACK,usertrack))
59$(eval $(call PKG_mod_template,LIGHTTPD_MOD_WEBDAV,webdav))
60
61$(WRKBUILD)/.configured:
62 (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
63 $(TARGET_CONFIGURE_OPTS) \
64 CFLAGS="$(TARGET_CFLAGS)" \
65 CPPFLAGS="-I$(STAGING_DIR)/usr/include/libxml2 -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
66 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
67 PCRE_LIB="-lpcre" \
68 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
69 ./configure \
70 --target=$(GNU_TARGET_NAME) \
71 --host=$(GNU_TARGET_NAME) \
72 --build=$(GNU_HOST_NAME) \
73 --program-prefix="" \
74 --program-suffix="" \
75 --prefix=/usr \
76 --exec-prefix=/usr \
77 --bindir=/usr/bin \
78 --datadir=/usr/share \
79 --includedir=/usr/include \
80 --infodir=/usr/share/info \
81 --libdir=/usr/lib/lighttpd \
82 --libexecdir=/usr/lib \
83 --localstatedir=/var \
84 --mandir=/usr/share/man \
85 --sbindir=/usr/sbin \
86 --sysconfdir=/etc/lighttpd \
87 --enable-largefile \
88 --disable-nls \
89 --enable-shared \
90 --enable-static \
91 --disable-rpath \
92 --without-attr \
93 --without-bzip2 \
94 --without-fam \
95 --without-gdbm \
96 --without-ldap \
97 --without-lua \
98 --without-memcache \
99 --without-mysql \
100 --with-openssl="$(STAGING_DIR)/usr" \
101 --with-pcre \
102 --without-valgrind \
103 --with-webdav-props \
104 )
105 touch $@
106
107$(WRKBUILD)/.built:
108 rm -rf $(WRKINST)
109 mkdir -p $(WRKINST)
110 $(MAKE) -C $(WRKBUILD) \
111 DESTDIR="$(WRKINST)" \
112 all install
113 touch $@
114
115$(IPKG_LIGHTTPD):
116 install -m0755 -d $(IDIR_LIGHTTPD)/etc
117 install -m0644 ./files/lighttpd.conf $(IDIR_LIGHTTPD)/etc/
118 install -m0755 -d $(IDIR_LIGHTTPD)/etc/default
119 install -m0644 ./files/lighttpd.default $(IDIR_LIGHTTPD)/etc/default/lighttpd
120 install -m0755 -d $(IDIR_LIGHTTPD)/etc/init.d
121 install -m0755 ./files/lighttpd.init $(IDIR_LIGHTTPD)/etc/init.d/lighttpd
122 install -m0755 -d $(IDIR_LIGHTTPD)/usr/lib/lighttpd
123 for m in dirlisting indexfile staticfile; do \
124 $(CP) $(WRKINST)/usr/lib/lighttpd/mod_$$m.so $(IDIR_LIGHTTPD)/usr/lib/lighttpd/ ; \
125 done
126 install -m0755 -d $(IDIR_LIGHTTPD)/usr/sbin
127 $(CP) $(WRKINST)/usr/sbin/lighttpd $(IDIR_LIGHTTPD)/usr/sbin/
128 $(RSTRIP) $(IDIR_LIGHTTPD)
129 $(IPKG_BUILD) $(IDIR_LIGHTTPD) $(PACKAGE_DIR)
130
Note: See TracBrowser for help on using the repository browser.