source: freewrt/package/squid/Makefile@ ff38870

Last change on this file since ff38870 was 99cbe83, checked in by Thorsten Glaser <tg@…>, 19 years ago

the treebreaker ☺

overhaul the fetch'n'checksum system to be more bsd-like

  • make fetch, make checksum supported
  • future expansion possibilities already prepared: – more distfiles than just one – check sizes of downloaded files (size matters!!!!!111) – more hashes than just MD5 – recursive fetch/checksum targets – PERMIT_{SOURCES,DISTFILES}=Yes/«reason» – licence issues
  • download.pl dies

quirks:

  • GNU make only has a poor excuse for a .for loop
  • some things (esp. toolchain and target/linux) now have a ${WRKDIR} where they didn't have it before
  • ${WRKDIR}/.checksum_done – no comment… it was necessary because otherwise everything will get rebuilt every time (did I mention that GNU make sucks?)
  • I had troubles tracking the dependency problems down because GNU make, unlike BSD make, doesn't have good debugging
  • DISTFILES -> FULLDISTFILES
  • DL_DIR -> DISTDIR
  • PKG_SOURCE -> DISTFILES
  • PKG_SOURCE_URL -> MASTER_SITES
  • no @SF and @GNU any more, use BSD network.template syntax (feel free to add more master sites)
  • GNU make doesn't really strip whitespaces from variables… (did I mention how much better BSD make is?)
  • echo 'LOCAL_DISTFILES=/path/to/distfiles' >>${TOPDIR}/prefs.mk will save the need to download 'em, Closes: #102
  • MASTER_SITES now *must* have the trailing slashes (there may be a few that don't and a few with double ones, please fix them)

I've tested that a normal build (unchanged .config from the default) works
on GNU/Linux. There's definitively room for improvement, but most of that
will come with the NFO system only. Fixes appreciated.

This work sponsored by AurISP, part of the NFO conversion project ☻

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

  • Property mode set to 100644
File size: 7.2 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:= squid
10PKG_VERSION:= 2.5.STABLE13
11PKG_RELEASE:= 1
12PKG_MD5SUM:= 3e64468e123be1246d17486dab6bee87
13MASTER_SITES:= http://www.squid-cache.org/Versions/v2/2.5/
14DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
15
16AUTH_MODULES:=basic digest ntlm
17ifneq (${FWRT_PACKAGE_SQUID_MOD_BASIC_AUTH_GETPWNAM},)
18BASIC_AUTH_HELPERS+= getpwnam
19endif
20ifneq (${FWRT_PACKAGE_SQUID_MOD_BASIC_AUTH_NCSA},)
21BASIC_AUTH_HELPERS+= NCSA
22endif
23ifneq (${FWRT_PACKAGE_SQUID_MOD_BASIC_AUTH_SMB},)
24BASIC_AUTH_HELPERS+= SMB
25endif
26ifneq (${FWRT_PACKAGE_SQUID_MOD_BASIC_AUTH_WINBIND},)
27BASIC_AUTH_HELPERS+= winbind
28endif
29
30ifneq (${FWRT_PACKAGE_SQUID_MOD_DIGEST_AUTH_PASSWORD},)
31DIGEST_AUTH_HELPERS:= password
32endif
33
34ifneq (${FWRT_PACKAGE_SQUID_MOD_EXTERNAL_ACL_IP_USER},)
35EXTERNAL_ACL_HELPERS+= ip_user
36endif
37ifneq (${FWRT_PACKAGE_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP},)
38EXTERNAL_ACL_HELPERS+= unix_group
39endif
40ifneq (${FWRT_PACKAGE_SQUID_MOD_EXTERNAL_ACL_WINBIND_GROUP},)
41EXTERNAL_ACL_HELPERS+= winbind_group
42endif
43
44ifneq (${FWRT_PACKAGE_SQUID_MOD_NTLM_AUTH_FAKEAUTH},)
45NTLM_AUTH_HELPERS+= fakeauth
46endif
47ifneq (${FWRT_PACKAGE_SQUID_MOD_NTLM_AUTH_SMB_AUTH},)
48NTLM_AUTH_HELPERS+= SMB
49endif
50ifneq (${FWRT_PACKAGE_SQUID_MOD_NTLM_AUTH_WINBIND_AUTH},)
51NTLM_AUTH_HELPERS+= winbind
52endif
53
54include ${TOPDIR}/mk/package.mk
55
56define PKG_mod_template
57if [ -e ${WRKINST}/usr/lib/squid/${2} ]; then \
58 ${INSTALL_DIR} ${IDIR_${1}}/usr/lib/squid/ ; \
59 ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/${2} ${IDIR_${1}}/usr/lib/squid/ ; \
60fi
61endef
62
63#$${IPKG_${1}}:
64# install -d -m0755 $${IDIR_${1}}/usr/lib/squid
65# if [ -e ${WRKINST}/usr/lib/squid/${2} ]; then \
66# ${CP} ${WRKINST}/usr/lib/squid/${2} $${IDIR_${1}}/usr/lib/squid/ ; \
67# fi
68# ${RSTRIP} $${IDIR_${1}}
69# ${IPKG_BUILD} $${IDIR_${1}} ${PACKAGE_DIR}
70#
71#endef
72
73
74$(eval $(call PKG_template,SQUID,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
75$(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_GETPWNAM,${PKG_NAME}-mod-basic-auth-getpwnam,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
76$(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_NCSA,${PKG_NAME}-mod-basic-auth-ncsa,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
77$(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_SMB,${PKG_NAME}-mod-basic-auth-smb,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
78$(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_WINBIND,${PKG_NAME}-mod-basic-auth-winbind,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
79$(eval $(call PKG_template,SQUID_MOD_DIGEST_AUTH_PASSWORD,${PKG_NAME}-mod-digest-auth-password,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
80$(eval $(call PKG_template,SQUID_MOD_EXTERNAL_ACL_IP_USER,${PKG_NAME}-mod-external-acl-ip-user,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
81$(eval $(call PKG_template,SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP,${PKG_NAME}-mod-external-acl-unix-group,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
82$(eval $(call PKG_template,SQUID_MOD_EXTERNAL_ACL_WINBIND_GROUP,${PKG_NAME}-mod-external-acl-winbind-group,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
83$(eval $(call PKG_template,SQUID_MOD_NTLM_AUTH_FAKEAUTH,${PKG_NAME}-mod-ntlm-auth-fakeauth,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
84$(eval $(call PKG_template,SQUID_MOD_NTLM_AUTH_SMB_AUTH,${PKG_NAME}-mod-ntlm-auth-smb-auth,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
85$(eval $(call PKG_template,SQUID_MOD_NTLM_AUTH_WINBIND_AUTH,${PKG_NAME}-mod-ntlm-auth-winbind-auth,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
86
87#${eval ${call PKG_mod_template,SQUID_MOD_BASIC_AUTH_GETPWNAM,getpwname_auth}}
88#${eval ${call PKG_mod_template,SQUID_MOD_BASIC_AUTH_LDAP,ldap}}
89#${eval ${call PKG_mod_template,SQUID_MOD_BASIC_AUTH_NCSA,ncsa_auth}}
90#${eval ${call PKG_mod_template,SQUID_MOD_BASIC_AUTH_SMB,smb_auth}}
91#${eval ${call PKG_mod_template,SQUID_MOD_BASIC_AUTH_WINBIND,wb_auth}}
92#${eval ${call PKG_mod_template,SQUID_MOD_DIGEST_AUTH_PASSWORD,digest_pw_auth}}
93#${eval ${call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_IP_USER,ip_user_check}}
94#${eval ${call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_LDAP_GROUP,ldap_auth}}
95#${eval ${call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP,squid_unix_group}}
96#${eval ${call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_WINBIND_GROUP,wb_group}}
97#${eval ${call PKG_mod_template,SQUID_MOD_NTLM_AUTH_FAKEAUTH,fakeauth_auth}}
98#${eval ${call PKG_mod_template,SQUID_MOD_NTLM_AUTH_SMB_AUTH,ntlm_auth}}
99#${eval ${call PKG_mod_template,SQUID_MOD_NTLM_AUTH_WINBIND_AUTH,wb_ntlmauth}}
100
101CONFIGURE_STYLE:= gnu
102CONFIGURE_ENV+= ac_cv_sizeof_void_p=4 \
103 ac_cv_sizeof_short=2 \
104 ac_cv_sizeof_int=4 \
105 ac_cv_sizeof_long=4 \
106 ac_cv_sizeof_long_long=8 \
107 ac_cv_sizeof___int64=0 \
108 ac_cv_sizeof_int16_t=2 \
109 ac_cv_sizeof_uint16_t=2 \
110 ac_cv_sizeof_u_int16_t=2 \
111 ac_cv_sizeof_int32_t=4 \
112 ac_cv_sizeof_uint32_t=4 \
113 ac_cv_sizeof_u_int32_t=4 \
114 ac_cv_sizeof_int64_t=8 \
115 ac_cv_sizeof_uint64_t=8 \
116 ac_cv_sizeof_u_int64_t=8 \
117 ac_cv_func_setresuid=no \
118 ac_cv_func_va_copy=no \
119 ac_cv_func___va_copy=no
120CONFIGURE_ARGS+= --datadir=/usr/share/squid \
121 --libexecdir=/usr/lib/squid \
122 --sysconfdir=/etc/squid \
123 --enable-static \
124 --with-gnu-ld \
125 --enable-x-accelerator-vary \
126 --with-pthreads \
127 --with-dl \
128 --enable-icmp \
129 --enable-kill-parent-hack \
130 --enable-arp-acl \
131 --enable-ssl \
132 --enable-htcp \
133 --enable-err-languages=English \
134 --enable-default-err-language=English \
135 --enable-linux-netfilter \
136 --enable-icmp \
137 --enable-external-acl-helpers="" \
138 --enable-underscores \
139 --enable-cache-digests \
140 --enable-referer-log \
141 --enable-delay-pools \
142 --enable-useragent-log \
143 --with-openssl=${STAGING_DIR}/usr \
144 --enable-auth="${AUTH_MODULES}" \
145 --enable-basic-auth-helpers="${BASIC_AUTH_HELPERS}" \
146 --enable-ntlm-auth-helpers="${NTLM_AUTH_HELPERS}" \
147 --enable-digest-auth-helpers="${DIGEST_AUTH_HELPERS}" \
148 --enable-external-acl-helpers="${EXTERNAL_ACL_HELPERS}"
149BUILD_STYLE:= auto
150INSTALL_STYLE:= auto
151
152post-install:
153 ${INSTALL_DIR} ${IDIR_SQUID}/etc/squid
154 ${INSTALL_DATA} ${WRKINST}/etc/squid/mime.conf \
155 ${WRKINST}/etc/squid/squid.conf ${IDIR_SQUID}/etc/squid/
156 ${INSTALL_DIR} ${IDIR_SQUID}/usr/share/squid
157 ${CP} ${WRKINST}/usr/share/squid/* ${IDIR_SQUID}/usr/share/squid/
158 ${INSTALL_DIR} ${IDIR_SQUID}/usr/sbin
159 ${INSTALL_BIN} ${WRKINST}/usr/sbin/squid ${IDIR_SQUID}/usr/sbin/
160 $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_GETPWNAM,getpwname_auth)
161 $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_LDAP,ldap)
162 $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_NCSA,ncsa_auth)
163 $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_SMB,smb_auth)
164 $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_WINBIND,wb_auth)
165 $(call PKG_mod_template,SQUID_MOD_DIGEST_AUTH_PASSWORD,digest_pw_auth)
166 $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_IP_USER,ip_user_check)
167 $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_LDAP_GROUP,ldap_auth)
168 $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP,squid_unix_group)
169 $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_WINBIND_GROUP,wb_group)
170 $(call PKG_mod_template,SQUID_MOD_NTLM_AUTH_FAKEAUTH,fakeauth_auth)
171 $(call PKG_mod_template,SQUID_MOD_NTLM_AUTH_SMB_AUTH,ntlm_auth)
172 $(call PKG_mod_template,SQUID_MOD_NTLM_AUTH_WINBIND_AUTH,wb_ntlmauth)
173
174include ${TOPDIR}/mk/pkg-bottom.mk
Note: See TracBrowser for help on using the repository browser.