add some more comments, from Georg Lucas
[openwrt.git] / openwrt / package / lighttpd / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=lighttpd
6 PKG_VERSION:=1.3.14
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=16d9f8c40bcb5638ee452fa23b21e346
9
10 PKG_SOURCE_URL:=http://www.lighttpd.net/download/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 define PKG_mod_template
20
21 $$(IPKG_$(1)):
22 install -d -m0755 $$(IDIR_$(1))/usr/lib
23 install -m0755 $(PKG_INSTALL_DIR)/usr/lib/mod_$(2).so $$(IDIR_$(1))/usr/lib/
24 $(RSTRIP) $$(IDIR_$(1))
25 $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
26
27 endef
28
29 $(eval $(call PKG_template,LIGHTTPD,lighttpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
30 $(eval $(call PKG_template,LIGHTTPD_MOD_ALIAS,lighttpd-mod-alias,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
31 $(eval $(call PKG_template,LIGHTTPD_MOD_AUTH,lighttpd-mod-auth,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
32 $(eval $(call PKG_template,LIGHTTPD_MOD_CGI,lighttpd-mod-cgi,$(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_STATUS,lighttpd-mod-status,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
40 $(eval $(call PKG_template,LIGHTTPD_MOD_USERTRACK,lighttpd-mod-usertrack,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
41
42 $(eval $(call PKG_mod_template,LIGHTTPD_MOD_ALIAS,alias))
43 $(eval $(call PKG_mod_template,LIGHTTPD_MOD_AUTH,auth))
44 $(eval $(call PKG_mod_template,LIGHTTPD_MOD_CGI,cgi))
45 $(eval $(call PKG_mod_template,LIGHTTPD_MOD_FASTCGI,fastcgi))
46 $(eval $(call PKG_mod_template,LIGHTTPD_MOD_PROXY,proxy))
47 $(eval $(call PKG_mod_template,LIGHTTPD_MOD_REDIRECT,redirect))
48 $(eval $(call PKG_mod_template,LIGHTTPD_MOD_REWRITE,rewrite))
49 $(eval $(call PKG_mod_template,LIGHTTPD_MOD_SETENV,setenv))
50 $(eval $(call PKG_mod_template,LIGHTTPD_MOD_SIMPLE_VHOST,simple_vhost))
51 $(eval $(call PKG_mod_template,LIGHTTPD_MOD_STATUS,status))
52 $(eval $(call PKG_mod_template,LIGHTTPD_MOD_USERTRACK,usertrack))
53
54 $(PKG_BUILD_DIR)/.configured:
55 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
56 $(TARGET_CONFIGURE_OPTS) \
57 CFLAGS="$(TARGET_CFLAGS)" \
58 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
59 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
60 PCRE_LIB="-lpcre" \
61 ./configure \
62 --target=$(GNU_TARGET_NAME) \
63 --host=$(GNU_TARGET_NAME) \
64 --build=$(GNU_HOST_NAME) \
65 --program-prefix="" \
66 --program-suffix="" \
67 --prefix=/usr \
68 --exec-prefix=/usr \
69 --bindir=/usr/bin \
70 --datadir=/usr/share \
71 --includedir=/usr/include \
72 --infodir=/usr/share/info \
73 --libdir=/usr/lib \
74 --libexecdir=/usr/lib \
75 --localstatedir=/var \
76 --mandir=/usr/share/man \
77 --sbindir=/usr/sbin \
78 --sysconfdir=/etc \
79 $(DISABLE_LARGEFILE) \
80 $(DISABLE_NLS) \
81 --enable-shared \
82 --enable-static \
83 --with-openssl="$(STAGING_DIR)/usr" \
84 )
85 touch $@
86
87 $(PKG_BUILD_DIR)/.built:
88 rm -rf $(PKG_INSTALL_DIR)
89 mkdir -p $(PKG_INSTALL_DIR)
90 $(MAKE) -C $(PKG_BUILD_DIR) \
91 DESTDIR="$(PKG_INSTALL_DIR)" \
92 all install
93 touch $@
94
95 $(IPKG_LIGHTTPD):
96 install -m0755 -d $(IDIR_LIGHTTPD)/etc
97 install -m0644 ./files/lighttpd.conf $(IDIR_LIGHTTPD)/etc/
98 install -m0755 -d $(IDIR_LIGHTTPD)/etc/default
99 install -m0644 ./files/lighttpd.default $(IDIR_LIGHTTPD)/etc/default/lighttpd
100 install -m0755 -d $(IDIR_LIGHTTPD)/etc/init.d
101 install -m0755 ./files/lighttpd.init $(IDIR_LIGHTTPD)/etc/init.d/lighttpd
102 install -m0755 -d $(IDIR_LIGHTTPD)/usr/sbin
103 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/lighttpd $(IDIR_LIGHTTPD)/usr/sbin/
104 $(RSTRIP) $(IDIR_LIGHTTPD)
105 $(IPKG_BUILD) $(IDIR_LIGHTTPD) $(PACKAGE_DIR)
106
This page took 0.049121 seconds and 5 git commands to generate.