source: freewrt/package/mini_httpd/Makefile@ d419478

freewrt_1_0 freewrt_2_0
Last change on this file since d419478 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: 4.2 KB
Line 
1# $Id: Makefile 3129 2006-02-04 21:55:53Z florian $
2
3include $(TOPDIR)/rules.mk
4
5PKG_NAME:=mini-httpd
6PKG_VERSION:=1.19
7PKG_RELEASE:=1
8PKG_MD5SUM:=7c68293ad265ecfe2edea917912f6f1f
9
10PKG_SOURCE_URL:=http://www.acme.com/software/mini_httpd/
11PKG_SOURCE:=mini_httpd-$(PKG_VERSION).tar.gz
12
13WRKBUILD:=${WRKDIR}/mini_httpd-$(PKG_VERSION)
14
15include $(TOPDIR)/package/rules.mk
16
17$(eval $(call PKG_template,MINI_HTTPD,mini-httpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
18$(eval $(call PKG_template,MINI_HTTPD_HTPASSWD,mini-httpd-htpasswd,$(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$(WRKBUILD)/.configured:
24 $(CP) ./files/matrixssl_helper.{c,h} $(WRKBUILD)/
25 touch $@
26
27$(WRKBUILD)/.built:
28 # with MatrixSSL
29ifneq ($(BR2_PACKAGE_MINI_HTTPD_MATRIXSSL),)
30 $(MAKE) -C $(WRKBUILD) \
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 $(WRKBUILD); mv mini_httpd mini_httpd-matrixssl; )
39 $(MAKE) -C $(WRKBUILD) clean
40endif
41 # with OpenSSL
42ifneq ($(BR2_PACKAGE_MINI_HTTPD_OPENSSL),)
43 $(MAKE) -C $(WRKBUILD) \
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 $(WRKBUILD); mv mini_httpd mini_httpd-openssl; )
51 $(MAKE) -C $(WRKBUILD) clean
52endif
53 # without SSL
54ifneq ($(BR2_PACKAGE_MINI_HTTPD),)
55 $(MAKE) -C $(WRKBUILD) \
56 CC=$(TARGET_CC) \
57 OFLAGS="$(TARGET_CFLAGS)" \
58 all
59endif
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 $(WRKBUILD)/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_HTPASSWD):
75 install -d -m0755 $(IDIR_MINI_HTTPD_HTPASSWD)/usr/sbin
76 install -m0755 $(WRKBUILD)/htpasswd $(IDIR_MINI_HTTPD_HTPASSWD)/usr/sbin/
77 $(RSTRIP) $(IDIR_MINI_HTTPD_HTPASSWD)
78 $(IPKG_BUILD) $(IDIR_MINI_HTTPD_HTPASSWD) $(PACKAGE_DIR)
79
80$(IPKG_MINI_HTTPD_MATRIXSSL):
81 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc
82 install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/mini_httpd.conf
83 install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/
84 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default
85 install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default/mini_httpd
86 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d
87 install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d/mini_httpd
88 install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin
89 install -m0755 $(WRKBUILD)/mini_httpd-matrixssl $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin/mini_httpd
90 $(RSTRIP) $(IDIR_MINI_HTTPD_MATRIXSSL)
91 $(IPKG_BUILD) $(IDIR_MINI_HTTPD_MATRIXSSL) $(PACKAGE_DIR)
92
93$(IPKG_MINI_HTTPD_OPENSSL):
94 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc
95 install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_OPENSSL)/etc/mini_httpd.conf
96 install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_OPENSSL)/etc/
97 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/default
98 install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_OPENSSL)/etc/default/mini_httpd
99 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d
100 install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d/mini_httpd
101 install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin
102 install -m0755 $(WRKBUILD)/mini_httpd-openssl $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin/mini_httpd
103 $(RSTRIP) $(IDIR_MINI_HTTPD_OPENSSL)
104 $(IPKG_BUILD) $(IDIR_MINI_HTTPD_OPENSSL) $(PACKAGE_DIR)
Note: See TracBrowser for help on using the repository browser.