source: freewrt/package/mini_httpd/Makefile@ 6fc4520e

freewrt_1_0 freewrt_2_0
Last change on this file since 6fc4520e was c8b93bd, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

major package Makefile cleanup. remove mostly-clean, add licence header, always use RSTRIP varibale for stripping, rename some init scripts, indent

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

  • Property mode set to 100644
File size: 4.3 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:= mini-httpd
10PKG_VERSION:= 1.19
11PKG_RELEASE:= 1
12PKG_MD5SUM:= 7c68293ad265ecfe2edea917912f6f1f
13
14PKG_SOURCE_URL:= http://www.acme.com/software/mini_httpd/
15PKG_SOURCE:= mini_httpd-$(PKG_VERSION).tar.gz
16
17WRKSRC= ${WRKDIR}/mini_httpd-$(PKG_VERSION)
18
19include $(TOPDIR)/mk/package.mk
20
21$(eval $(call PKG_template,MINI_HTTPD,mini-httpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
22$(eval $(call PKG_template,MINI_HTTPD_HTPASSWD,mini-httpd-htpasswd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
23$(eval $(call PKG_template,MINI_HTTPD_MATRIXSSL,mini-httpd-matrixssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
24$(eval $(call PKG_template,MINI_HTTPD_OPENSSL,mini-httpd-openssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
25
26
27$(WRKBUILD)/.configured:
28 $(CP) ./files/matrixssl_helper.{c,h} $(WRKBUILD)/
29 touch $@
30
31$(WRKBUILD)/.built:
32 # with MatrixSSL
33ifneq ($(FWRT_PACKAGE_MINI_HTTPD_MATRIXSSL),)
34 $(MAKE) -C $(WRKBUILD) \
35 CC=$(TARGET_CC) \
36 OFLAGS="$(TARGET_CFLAGS)" \
37 SSL_DEFS="-DUSE_SSL -DHAVE_MATRIXSSL" \
38 SSL_INC="-I$(STAGING_DIR)/usr/include" \
39 SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lmatrixssl" \
40 SSL_OBJS="matrixssl_helper.o" \
41 all
42 (cd $(WRKBUILD); mv mini_httpd mini_httpd-matrixssl; )
43 $(MAKE) -C $(WRKBUILD) clean
44endif
45 # with OpenSSL
46ifneq ($(FWRT_PACKAGE_MINI_HTTPD_OPENSSL),)
47 $(MAKE) -C $(WRKBUILD) \
48 CC=$(TARGET_CC) \
49 OFLAGS="$(TARGET_CFLAGS)" \
50 SSL_DEFS="-DUSE_SSL -DHAVE_OPENSSL" \
51 SSL_INC="-I$(STAGING_DIR)/usr/include" \
52 SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto" \
53 all
54 (cd $(WRKBUILD); mv mini_httpd mini_httpd-openssl; )
55 $(MAKE) -C $(WRKBUILD) clean
56endif
57 # without SSL
58ifneq ($(FWRT_PACKAGE_MINI_HTTPD),)
59 $(MAKE) -C $(WRKBUILD) \
60 CC=$(TARGET_CC) \
61 OFLAGS="$(TARGET_CFLAGS)" \
62 all
63endif
64 touch $@
65
66$(IPKG_MINI_HTTPD):
67 install -d -m0755 $(IDIR_MINI_HTTPD)/etc
68 install -m0644 ./files/mini_httpd.conf $(IDIR_MINI_HTTPD)/etc/mini_httpd.conf
69 install -d -m0755 $(IDIR_MINI_HTTPD)/etc/default
70 install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD)/etc/default/mini_httpd
71 install -d -m0755 $(IDIR_MINI_HTTPD)/etc/init.d
72 install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD)/etc/init.d/mini_httpd
73 install -d -m0755 $(IDIR_MINI_HTTPD)/usr/sbin
74 install -m0755 $(WRKBUILD)/mini_httpd $(IDIR_MINI_HTTPD)/usr/sbin/
75 $(RSTRIP) $(IDIR_MINI_HTTPD)
76 $(IPKG_BUILD) $(IDIR_MINI_HTTPD) $(PACKAGE_DIR)
77
78$(IPKG_MINI_HTTPD_HTPASSWD):
79 install -d -m0755 $(IDIR_MINI_HTTPD_HTPASSWD)/usr/sbin
80 install -m0755 $(WRKBUILD)/htpasswd $(IDIR_MINI_HTTPD_HTPASSWD)/usr/sbin/
81 $(RSTRIP) $(IDIR_MINI_HTTPD_HTPASSWD)
82 $(IPKG_BUILD) $(IDIR_MINI_HTTPD_HTPASSWD) $(PACKAGE_DIR)
83
84$(IPKG_MINI_HTTPD_MATRIXSSL):
85 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc
86 install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/mini_httpd.conf
87 install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/
88 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default
89 install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default/mini_httpd
90 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d
91 install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d/mini_httpd
92 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin
93 install -m0755 $(WRKBUILD)/mini_httpd-matrixssl $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin/mini_httpd
94 $(RSTRIP) $(IDIR_MINI_HTTPD_MATRIXSSL)
95 $(IPKG_BUILD) $(IDIR_MINI_HTTPD_MATRIXSSL) $(PACKAGE_DIR)
96
97$(IPKG_MINI_HTTPD_OPENSSL):
98 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc
99 install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_OPENSSL)/etc/mini_httpd.conf
100 install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_OPENSSL)/etc/
101 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/default
102 install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_OPENSSL)/etc/default/mini_httpd
103 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d
104 install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d/mini_httpd
105 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin
106 install -m0755 $(WRKBUILD)/mini_httpd-openssl $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin/mini_httpd
107 $(RSTRIP) $(IDIR_MINI_HTTPD_OPENSSL)
108 $(IPKG_BUILD) $(IDIR_MINI_HTTPD_OPENSSL) $(PACKAGE_DIR)
Note: See TracBrowser for help on using the repository browser.