check if vim exist, report bye datenmaulwurf
[openwrt.git] / package / mgetty / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=mgetty
6 PKG_VERSION:=1.1.35
7 PKG_XVERSION:=Feb22
8 PKG_RELEASE:=1
9 PKG_MD5SUM:=6805f8e31423bb777be80e3a856001cb
10
11 PKG_SOURCE_URL:=ftp://alpha.greenie.net/pub/mgetty/source/1.1
12 PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION)-$(PKG_XVERSION).tar.gz
13 PKG_CAT:=zcat
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,MGETTY,mgetty,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 $(PKG_BUILD_DIR)/policy.h: $(PKG_BUILD_DIR)/.prepared
22 cp $(PKG_BUILD_DIR)/policy.h-dist $(PKG_BUILD_DIR)/policy.h
23 echo "#define AUTO_PPP" >> $(PKG_BUILD_DIR)/policy.h
24 echo "#undef FAX_NOTIFY_PROGRAM" >> $(PKG_BUILD_DIR)/policy.h
25 echo "#define FAX_NOTIFY_PROGRAM \"/usr/lib/mgetty+sendfax/new_fax\"" >> $(PKG_BUILD_DIR)/policy.h
26 echo "#undef DATA_FLOW" >> $(PKG_BUILD_DIR)/policy.h
27 echo "#define DATA_FLOW FLOW_HARD" >> $(PKG_BUILD_DIR)/policy.h
28 echo "#undef DEVICE_GROUP" >> $(PKG_BUILD_DIR)/policy.h
29 echo "#undef DEVICE_OWNER" >> $(PKG_BUILD_DIR)/policy.h
30 echo "#define DEVICE_OWNER \"root\"" >> $(PKG_BUILD_DIR)/policy.h
31 echo "#undef FAXREC_FLOW" >> $(PKG_BUILD_DIR)/policy.h
32 echo "#define FAXREC_FLOW FLOW_SOFT" >> $(PKG_BUILD_DIR)/policy.h
33 echo "#undef FAXSEND_FLOW" >> $(PKG_BUILD_DIR)/policy.h
34 echo "#define FAXSEND_FLOW FLOW_SOFT" >> $(PKG_BUILD_DIR)/policy.h
35
36 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/policy.h
37 touch $@
38
39 $(PKG_BUILD_DIR)/.built:
40 mkdir -p $(PKG_INSTALL_DIR)/usr/bin
41 mkdir -p $(PKG_INSTALL_DIR)/usr/sbin
42 mkdir -p $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax
43 mkdir -p $(PKG_INSTALL_DIR)/etc/mgetty+sendfax
44 $(MAKE) -C $(PKG_BUILD_DIR) \
45 $(TARGET_CONFIGURE_OPTS) \
46 prefix="$(PKG_INSTALL_DIR)/usr" \
47 CONFDIR=/etc/mgetty+sendfax \
48 bin-all
49 $(CP) $(PKG_BUILD_DIR)/mgetty $(PKG_INSTALL_DIR)/usr/sbin
50 $(CP) $(PKG_BUILD_DIR)/sendfax $(PKG_INSTALL_DIR)/usr/sbin
51 $(CP) $(PKG_BUILD_DIR)/fax/faxrunqd $(PKG_INSTALL_DIR)/usr/sbin
52 chmod 755 $(PKG_INSTALL_DIR)/usr/sbin/*
53 $(CP) $(PKG_BUILD_DIR)/fax/faxq-helper $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax
54 chmod u+s $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax/faxq-helper
55 $(CP) $(PKG_BUILD_DIR)/fax/cour25n.pbm $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax
56 $(CP) $(PKG_BUILD_DIR)/fax/cour25.pbm $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax
57 $(CP) $(PKG_BUILD_DIR)/fax/faxq $(PKG_INSTALL_DIR)/usr/bin
58 $(CP) $(PKG_BUILD_DIR)/fax/faxrm $(PKG_INSTALL_DIR)/usr/bin
59 $(CP) $(PKG_BUILD_DIR)/fax/faxrunq $(PKG_INSTALL_DIR)/usr/bin
60 $(CP) $(PKG_BUILD_DIR)/fax/faxspool $(PKG_INSTALL_DIR)/usr/bin
61 $(CP) $(PKG_BUILD_DIR)/g3/g32pbm $(PKG_INSTALL_DIR)/usr/bin
62 (cd $(PKG_INSTALL_DIR)/usr/bin;\
63 ln -snf g32pbm g3topbm;\
64 );
65 $(CP) $(PKG_BUILD_DIR)/g3/g3cat $(PKG_INSTALL_DIR)/usr/bin
66 $(CP) $(PKG_BUILD_DIR)/g3/pbm2g3 $(PKG_INSTALL_DIR)/usr/bin
67 $(CP) $(PKG_BUILD_DIR)/g3/sff2g3 $(PKG_INSTALL_DIR)/usr/bin
68 chmod 755 $(PKG_INSTALL_DIR)/usr/bin/*
69 # Installation into /etc
70 $(CP) $(PKG_BUILD_DIR)/dialin.config $(PKG_INSTALL_DIR)/etc/mgetty+sendfax
71 $(CP) $(PKG_BUILD_DIR)/fax/faxheader $(PKG_INSTALL_DIR)/etc/mgetty+sendfax
72 $(CP) $(PKG_BUILD_DIR)/faxrunq.config $(PKG_INSTALL_DIR)/etc/mgetty+sendfax
73 $(CP) $(PKG_BUILD_DIR)/fax/faxspool.rules $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/faxspool.rules.sample
74 $(PKG_BUILD_DIR)/sedscript < $(PKG_BUILD_DIR)/login.cfg.in > $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/login.config
75 $(PKG_BUILD_DIR)/sedscript < $(PKG_BUILD_DIR)/mgetty.cfg.in > $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/mgetty.config
76 $(PKG_BUILD_DIR)/sedscript < $(PKG_BUILD_DIR)/sendfax.cfg.in > $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/sendfax.config
77 touch $@
78
79 ISBIN:=$(IDIR_MGETTY)/usr/sbin
80 IBIN:=$(IDIR_MGETTY)/usr/bin
81 ILIB:=$(IDIR_MGETTY)/usr/lib/mgetty+sendfax
82 IETC:=$(IDIR_MGETTY)/etc/mgetty+sendfax
83
84 $(IPKG_MGETTY):
85 install -d -m0755 $(ISBIN) $(IBIN) $(ILIB) $(IETC)
86 install -m0755 \
87 $(PKG_INSTALL_DIR)/usr/bin/faxq \
88 $(PKG_INSTALL_DIR)/usr/bin/faxrm \
89 $(PKG_INSTALL_DIR)/usr/bin/faxrunq \
90 $(PKG_INSTALL_DIR)/usr/bin/faxspool \
91 $(PKG_INSTALL_DIR)/usr/bin/g32pbm \
92 $(PKG_INSTALL_DIR)/usr/bin/g3cat \
93 $(PKG_INSTALL_DIR)/usr/bin/pbm2g3 \
94 $(PKG_INSTALL_DIR)/usr/bin/sff2g3 \
95 $(IBIN)
96 install -m0755 \
97 $(PKG_INSTALL_DIR)/usr/sbin/mgetty \
98 $(PKG_INSTALL_DIR)/usr/sbin/sendfax \
99 $(PKG_INSTALL_DIR)/usr/sbin/faxrunqd \
100 $(ISBIN)
101 install -m4755 \
102 $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax/faxq-helper \
103 $(ILIB)
104 install -m644 \
105 $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax/cour25n.pbm \
106 $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax/cour25.pbm \
107 $(ILIB)
108 install -m600 \
109 $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/dialin.config \
110 $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/faxheader \
111 $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/faxrunq.config \
112 $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/faxspool.rules.sample \
113 $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/login.config \
114 $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/mgetty.config \
115 $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/sendfax.config \
116 $(IETC)
117 $(RSTRIP) $(IDIR_MGETTY)
118 $(IPKG_BUILD) $(IDIR_MGETTY) $(PACKAGE_DIR)
This page took 0.053279 seconds and 5 git commands to generate.