source: freewrt/package/ncurses/Makefile@ a12b53f

freewrt_1_0 freewrt_2_0
Last change on this file since a12b53f 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.3 KB
Line 
1# $Id: Makefile 3112 2006-02-01 23:53:19Z mbm $
2
3include $(TOPDIR)/rules.mk
4
5PKG_NAME:=ncurses
6PKG_VERSION:=5.2
7PKG_RELEASE:=10
8PKG_MD5SUM:=464d6a49010cf2a6eb9ce59a264d4d47
9
10PKG_SOURCE_URL:=@GNU/ncurses
11PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12
13
14include $(TOPDIR)/package/rules.mk
15
16$(eval $(call PKG_template,LIBNCURSES,libncurses,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
17
18$(WRKBUILD)/.configured:
19 touch $@
20
21$(WRKBUILD)/.built:
22 rm -rf $(WRKINST)
23 mkdir -p $(WRKINST)
24 (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
25 ./configure \
26 --target=$(GNU_TARGET_NAME) \
27 --host=$(GNU_TARGET_NAME) \
28 --build=$(GNU_HOST_NAME) \
29 --program-prefix="" \
30 --program-suffix="" \
31 --prefix=/usr \
32 --exec-prefix=/usr \
33 --bindir=/usr/bin \
34 --datadir=/usr/share \
35 --includedir=/usr/include \
36 --infodir=/usr/share/info \
37 --libdir=/usr/lib \
38 --libexecdir=/usr/lib \
39 --localstatedir=/var \
40 --mandir=/usr/share/man \
41 --sbindir=/usr/sbin \
42 --sysconfdir=/etc \
43 --disable-nls \
44 --enable-largefile \
45 --enable-echo \
46 --enable-const \
47 --enable-overwrite \
48 --disable-rpath \
49 --without-ada \
50 --without-cxx \
51 --without-cxx-binding \
52 --without-debug \
53 --without-profile \
54 --with-progs \
55 --with-normal \
56 --without-shared \
57 --with-terminfo-dirs=/usr/share/terminfo \
58 --with-default-terminfo-dir=/usr/share/terminfo \
59 );
60 $(MAKE) -C $(WRKBUILD) \
61 DESTDIR="$(WRKINST)" \
62 libs install.progs
63 (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
64 $(TARGET_CONFIGURE_OPTS) \
65 CFLAGS="$(TARGET_CFLAGS)" \
66 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
67 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
68 ac_cv_linux_vers="2" \
69 ./configure \
70 --target=$(GNU_TARGET_NAME) \
71 --host=$(GNU_TARGET_NAME) \
72 --build=$(GNU_HOST_NAME) \
73 --program-prefix="" \
74 --program-suffix="" \
75 --prefix=/usr \
76 --exec-prefix=/usr \
77 --bindir=/usr/bin \
78 --datadir=/usr/share \
79 --includedir=/usr/include \
80 --infodir=/usr/share/info \
81 --libdir=/usr/lib \
82 --libexecdir=/usr/lib \
83 --localstatedir=/var \
84 --mandir=/usr/share/man \
85 --sbindir=/usr/sbin \
86 --sysconfdir=/etc \
87 --disable-nls \
88 --enable-largefile \
89 --enable-echo \
90 --enable-const \
91 --enable-overwrite \
92 --disable-rpath \
93 --without-ada \
94 --without-cxx \
95 --without-cxx-binding \
96 --without-debug \
97 --without-profile \
98 --without-progs \
99 --with-normal \
100 --with-shared \
101 --with-terminfo-dirs=/usr/share/terminfo \
102 --with-default-terminfo-dir=/usr/share/terminfo \
103 );
104 $(MAKE) -C $(WRKBUILD) \
105 $(TARGET_CONFIGURE_OPTS) \
106 BUILD_CC="$(TARGET_CC)" \
107 HOSTCC="$(HOSTCC)" \
108 HOSTCCFLAGS="\$$(CPPFLAGS)" \
109 DESTDIR="$(WRKINST)" \
110 libs install.libs install.data
111 touch $@
112
113$(IPKG_LIBNCURSES):
114 install -d -m0755 $(IDIR_LIBNCURSES)/usr/lib
115 $(CP) $(WRKINST)/usr/lib/lib{ncurses,panel,menu}*.so.* $(IDIR_LIBNCURSES)/usr/lib/
116 install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo
117 for f in a/ansi d/dumb l/linux r/rxvt s/screen v/vt100 v/vt102 v/vt220 x/xterm x/xterm-color; do \
118 install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo/`dirname $${f}`; \
119 $(CP) $(WRKINST)/usr/share/terminfo/$${f} \
120 $(IDIR_LIBNCURSES)/usr/share/terminfo/$${f}; \
121 done
122 $(RSTRIP) $(IDIR_LIBNCURSES)
123 $(IPKG_BUILD) $(IDIR_LIBNCURSES) $(PACKAGE_DIR)
124
125$(STAGING_DIR)/usr/lib/libncurses.so: $(WRKBUILD)/.built
126 mkdir -p $(STAGING_DIR)/usr/include
127 $(CP) $(WRKINST)/usr/include/curses.h $(STAGING_DIR)/usr/include/
128 $(CP) $(WRKINST)/usr/include/{ncurses,panel}.h $(STAGING_DIR)/usr/include/
129 $(CP) $(WRKINST)/usr/include/panel.h $(STAGING_DIR)/usr/include/
130 $(CP) $(WRKINST)/usr/include/term{,cap}.h $(STAGING_DIR)/usr/include/
131 $(CP) $(WRKINST)/usr/include/unctrl.h $(STAGING_DIR)/usr/include/
132 $(CP) $(WRKINST)/usr/include/menu.h $(STAGING_DIR)/usr/include/
133 mkdir -p $(STAGING_DIR)/usr/lib
134 $(CP) $(WRKINST)/usr/lib/libcurses.so $(STAGING_DIR)/usr/lib/
135 $(CP) $(WRKINST)/usr/lib/lib{ncurses,panel,menu}.{a,so*} $(STAGING_DIR)/usr/lib/
136 touch $@
137
138install-dev: $(STAGING_DIR)/usr/lib/libncurses.so
139
140uninstall-dev:
141 rm -rf \
142 $(STAGING_DIR)/usr/include/curses.h \
143 $(STAGING_DIR)/usr/include/{ncurses,panel}.h \
144 $(STAGING_DIR)/usr/include/menu.h \
145 $(STAGING_DIR)/usr/include/panel.h \
146 $(STAGING_DIR)/usr/include/term{,cap}.h \
147 $(STAGING_DIR)/usr/include/unctrl.h \
148 $(STAGING_DIR)/usr/lib/libcurses.so \
149 $(STAGING_DIR)/usr/lib/lib{ncurses,panel}.{a,so*} \
150
151compile-targets: install-dev
152clean-targets: uninstall-dev
153
Note: See TracBrowser for help on using the repository browser.