move sysfs to mount_root
[openwrt.git] / package / mini_httpd / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=mini-httpd
6 PKG_VERSION:=1.19
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=792a529dfe974355aad8ba6c80e54e7a
9
10 PKG_SOURCE_URL:=http://www.acme.com/software/mini_httpd/
11 PKG_SOURCE:=mini_httpd-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/mini_httpd-$(PKG_VERSION)
15
16 include $(TOPDIR)/package/rules.mk
17
18 $(eval $(call PKG_template,MINI_HTTPD,mini-httpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
19 $(eval $(call PKG_template,MINI_HTTPD_MATRIXSSL,mini-httpd-matrixssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20 $(eval $(call PKG_template,MINI_HTTPD_OPENSSL,mini-httpd-openssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
21
22
23 $(PKG_BUILD_DIR)/.configured:
24 cp -f ./files/matrixssl_helper.{c,h} $(PKG_BUILD_DIR)/
25 touch $@
26
27 $(PKG_BUILD_DIR)/.built:
28 # with MatrixSSL
29 ifneq ($(BR2_PACKAGE_MINI_HTTPD_MATRIXSSL),)
30 $(MAKE) -C $(PKG_BUILD_DIR) \
31 CC=$(TARGET_CC) \
32 OFLAGS="$(TARGET_CFLAGS)" \
33 SSL_DEFS="-DUSE_SSL -DHAVE_MATRIXSSL" \
34 SSL_INC="-I$(STAGING_DIR)/usr/include" \
35 SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lmatrixssl" \
36 SSL_OBJS="matrixssl_helper.o" \
37 all
38 (cd $(PKG_BUILD_DIR); mv mini_httpd mini_httpd-matrixssl; )
39 $(MAKE) -C $(PKG_BUILD_DIR) clean
40 endif
41 # with OpenSSL
42 ifneq ($(BR2_PACKAGE_MINI_HTTPD_OPENSSL),)
43 $(MAKE) -C $(PKG_BUILD_DIR) \
44 CC=$(TARGET_CC) \
45 OFLAGS="$(TARGET_CFLAGS)" \
46 SSL_DEFS="-DUSE_SSL -DHAVE_OPENSSL" \
47 SSL_INC="-I$(STAGING_DIR)/usr/include" \
48 SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto" \
49 all
50 (cd $(PKG_BUILD_DIR); mv mini_httpd mini_httpd-openssl; )
51 $(MAKE) -C $(PKG_BUILD_DIR) clean
52 endif
53 # without SSL
54 ifneq ($(BR2_PACKAGE_MINI_HTTPD),)
55 $(MAKE) -C $(PKG_BUILD_DIR) \
56 CC=$(TARGET_CC) \
57 OFLAGS="$(TARGET_CFLAGS)" \
58 all
59 endif
60 touch $@
61
62 $(IPKG_MINI_HTTPD):
63 install -d -m0755 $(IDIR_MINI_HTTPD)/etc
64 install -m0644 ./files/mini_httpd.conf $(IDIR_MINI_HTTPD)/etc/mini_httpd.conf
65 install -d -m0755 $(IDIR_MINI_HTTPD)/etc/default
66 install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD)/etc/default/mini_httpd
67 install -d -m0755 $(IDIR_MINI_HTTPD)/etc/init.d
68 install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD)/etc/init.d/mini_httpd
69 install -d -m0755 $(IDIR_MINI_HTTPD)/usr/sbin
70 install -m0755 $(PKG_BUILD_DIR)/mini_httpd $(IDIR_MINI_HTTPD)/usr/sbin/
71 $(RSTRIP) $(IDIR_MINI_HTTPD)
72 $(IPKG_BUILD) $(IDIR_MINI_HTTPD) $(PACKAGE_DIR)
73
74 $(IPKG_MINI_HTTPD_MATRIXSSL):
75 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc
76 install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/mini_httpd.conf
77 install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/
78 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default
79 install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default/mini_httpd
80 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d
81 install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d/mini_httpd
82 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin
83 install -m0755 $(PKG_BUILD_DIR)/mini_httpd-matrixssl $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin/mini_httpd
84 $(RSTRIP) $(IDIR_MINI_HTTPD_MATRIXSSL)
85 $(IPKG_BUILD) $(IDIR_MINI_HTTPD_MATRIXSSL) $(PACKAGE_DIR)
86
87 $(IPKG_MINI_HTTPD_OPENSSL):
88 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc
89 install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_OPENSSL)/etc/mini_httpd.conf
90 install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_OPENSSL)/etc/
91 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/default
92 install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_OPENSSL)/etc/default/mini_httpd
93 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d
94 install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d/mini_httpd
95 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin
96 install -m0755 $(PKG_BUILD_DIR)/mini_httpd-openssl $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin/mini_httpd
97 $(RSTRIP) $(IDIR_MINI_HTTPD_OPENSSL)
98 $(IPKG_BUILD) $(IDIR_MINI_HTTPD_OPENSSL) $(PACKAGE_DIR)
This page took 0.04102 seconds and 5 git commands to generate.