1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR
)/rules.mk
9 PKG_HASH
:= dd86ebc421215a7b44095dc13b056921ba81e61b9f6f4cdab08ca135d02afb77
10 PKG_DESCR
:= mirbsd korn
shell
11 PKG_SECTION
:= base
/shells
13 PKG_URL
:= http
://www.mirbsd.org
/mksh.htm
14 PKG_SITES
:= $(MASTER_SITE_MIRBSD
:distfiles
/=dist/mir
/mksh
/)
16 PKG_DFLT_MKSH
:= y if
!ADK_APPLIANCE_TOOLCHAIN
18 PKG_SUBPKGS
:= MKSH MKSH_TEST
19 PKGSD_MKSH_TEST
:= install testsuite
20 PKGSC_MKSH_TEST
:= base
/tests
21 PKGSS_MKSH_TEST
:= perl ed
22 PKGSB_MKSH_TEST
:= ed-host
24 DISTFILES
:= $(PKG_NAME
)-R
$(PKG_VERSION
).tgz
25 WRKDIST
= $(WRKDIR
)/$(PKG_NAME
)
27 include $(ADK_TOPDIR
)/mk
/host.mk
28 include $(ADK_TOPDIR
)/mk
/package.mk
30 $(eval
$(call HOST_template
,MKSH
,mksh
,$(PKG_VERSION
)-$(PKG_RELEASE
)))
31 $(eval
$(call PKG_template
,MKSH
,mksh
,$(PKG_VERSION
)-$(PKG_RELEASE
),,$(PKG_DESCR
),$(PKG_SECTION
)))
32 $(eval
$(call PKG_template
,MKSH_TEST
,mksh-test
,$(PKG_VERSION
)-$(PKG_RELEASE
),,$(PKGSD_MKSH_TEST
),$(PKGSC_MKSH_TEST
)))
37 INSTALL_STYLE
:= manual
40 cd
$(WRKBUILD
) && $(BASH
) $(WRKSRC
)/Build.sh
-Q
-r
-c lto
43 $(INSTALL_DIR
) $(STAGING_HOST_DIR
)/usr
/bin
44 $(INSTALL_BIN
) $(WRKBUILD
)/mksh \
45 $(STAGING_HOST_DIR
)/usr
/bin
48 cd
$(WRKBUILD
) && CC
='$(TARGET_CC)' CFLAGS
='$(TARGET_CFLAGS)' \
49 CPPFLAGS
='$(TARGET_CPPFLAGS)' LDFLAGS
='$(TARGET_LDFLAGS)' \
50 HAVE_CAN_FSTACKPROTECTORALL
=0 HAVE_CAN_FSTACKPROTECTORSTRONG
=0 \
51 TARGET_OS
=Linux
$(BASH
) $(WRKSRC
)/Build.sh
-Q
-r
-c lto
54 $(INSTALL_DIR
) $(IDIR_MKSH
)/root
55 $(CP
) $(WRKSRC
)/dot.mkshrc
$(IDIR_MKSH
)/root
/.mkshrc
56 $(INSTALL_DIR
) $(IDIR_MKSH
)/bin
57 $(INSTALL_BIN
) $(WRKBUILD
)/mksh
$(IDIR_MKSH
)/bin
60 $(INSTALL_DIR
) $(IDIR_MKSH_TEST
)/opt
/mksh
61 $(CP
) $(WRKBUILD
)/* $(IDIR_MKSH_TEST
)/opt
/mksh
62 find
$(IDIR_MKSH_TEST
)/opt
/mksh
-name \
*.o
-delete
64 's!$(WRKBUILD)!/opt/mksh!g' \
65 -e
"s!PATH='[^']*'!PATH='/usr/sbin:/bin:/sbin:/usr/bin'!" \
66 $(IDIR_MKSH_TEST
)/opt
/mksh
/test.sh
68 include $(ADK_TOPDIR
)/mk
/host-bottom.mk
69 include $(ADK_TOPDIR
)/mk
/pkg-bottom.mk