add bitchx package from Duncan, thx
[openwrt/svn-archive/archive.git] / openwrt / package / bitchx / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=bitchx
6 PKG_VERSION:=1.1
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=611d2dda222f00c10140236f4c331572
9
10 PKG_SOURCE_URL:=http://bitchx.org/files/source/
11 PKG_SOURCE:=ircii-pana-$(PKG_VERSION)-final.tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/BitchX
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,BITCHX,bitchx,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
22 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
23 $(TARGET_CONFIGURE_OPTS) \
24 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
25 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
26 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
27 ./configure \
28 --target=$(GNU_HOST_NAME) \
29 --host=mipsel-linux-uclibc-gcc \
30 --build=$(GNU_HOST_NAME) \
31 --program-prefix="" \
32 --program-suffix="" \
33 --prefix=/usr \
34 --exec-prefix=/usr \
35 --bindir=/usr/bin \
36 --datadir=/usr/share \
37 --includedir=/usr/include \
38 --infodir=/usr/share/info \
39 --libdir=/usr/lib \
40 --libexecdir=/usr/lib \
41 --localstatedir=/var \
42 --mandir=/usr/share/man \
43 --sbindir=/usr/sbin \
44 --sysconfdir=/etc \
45 $(DISABLE_LARGEFILE) \
46 $(DISABLE_NLS) \
47 );
48 touch $@
49
50 $(PKG_BUILD_DIR)/.built:
51 rm -rf $(PKG_INSTALL_DIR)
52 mkdir -p $(PKG_INSTALL_DIR)
53 $(MAKE) -C $(PKG_BUILD_DIR) \
54 DESTDIR="$(PKG_INSTALL_DIR)" \
55 all
56 mkdir -p $(PKG_INSTALL_DIR)/tmp
57 mkdir -p $(PKG_INSTALL_DIR)/etc/init.d
58 mkdir -p $(PKG_INSTALL_DIR)/usr/bin
59 mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx
60 mkdir -p $(PKG_INSTALL_DIR)/usr/share/man/man1
61 mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx/translation
62 mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx/plugins
63 mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx/help
64 install -c $(PKG_BUILD_DIR)/source/BitchX $(PKG_INSTALL_DIR)/usr/bin/BitchX-1.1-final
65 rm -f $(PKG_INSTALL_DIR)/usr/bin/BitchX
66 ln -s /usr/bin/BitchX-1.1-final $(PKG_INSTALL_DIR)/usr/bin/BitchX
67 install -c $(PKG_BUILD_DIR)/BitchX.help $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.help
68 install -c $(PKG_BUILD_DIR)/BitchX.ircnames $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.ircnames
69 install -c $(PKG_BUILD_DIR)/BitchX.quit $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.quit
70 install -c $(PKG_BUILD_DIR)/BitchX.reasons $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.kick
71 install -c $(PKG_BUILD_DIR)/source/wserv $(PKG_INSTALL_DIR)/usr/lib/bx/wserv
72 install -c $(PKG_BUILD_DIR)/source/scr-bx $(PKG_INSTALL_DIR)/usr/bin/scr-bx
73 cp -fpR $(PKG_BUILD_DIR)/script $(PKG_INSTALL_DIR)/usr/lib/bx/
74 cp -fpR $(PKG_BUILD_DIR)/translation $(PKG_INSTALL_DIR)/usr/lib/bx/
75 bzip2 $(PKG_INSTALL_DIR)/usr/lib/bx/translation/*
76 cp -f ./files/bitchxrc $(PKG_INSTALL_DIR)/tmp/.bitchxrc
77 cp -pf ./files/S98bitchxrc $(PKG_INSTALL_DIR)/etc/init.d/S98bitchxrc
78 touch $@
79
80 $(IPKG_BITCHX):
81 install -d -m0755 $(IDIR_BITCHX)/usr/bin
82 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_BITCHX)/usr/bin
83 install -d -m0755 $(IDIR_BITCHX)/usr/lib
84 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/* $(IDIR_BITCHX)/usr/lib
85 install -d $(IDIR_BITCHX)/etc/init.d
86 cp -fp $(PKG_INSTALL_DIR)/etc/init.d/S98bitchxrc $(IDIR_BITCHX)/etc/init.d
87 install -d -m0755 $(IDIR_BITCHX)/tmp
88 cp -fp $(PKG_INSTALL_DIR)/tmp/.bitchxrc $(IDIR_BITCHX)/tmp
89 $(RSTRIP) $(IDIR_BITCHX)
90 $(IPKG_BUILD) $(IDIR_BITCHX) $(PACKAGE_DIR)