2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
16 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_SOURCE
:=$(PKG_NAME
)$(PKG_VERSION
)-$(PKG_XVERSION
).
tar.gz
18 PKG_SOURCE_URL
:=ftp
://alpha.greenie.net
/pub
/mgetty
/source
/1.1
19 PKG_MD5SUM
:=6805f8e31423bb777be80e3a856001cb
22 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
24 include $(INCLUDE_DIR
)/package.mk
29 TITLE
:=A data
/fax solution for your analog modem
32 define Package
/mgetty
/description
33 A data
/fax solution for your analog modem.
36 define Build
/Configure
37 cp
$(PKG_BUILD_DIR
)/policy.h-dist
$(PKG_BUILD_DIR
)/policy.h
38 echo
"#define AUTO_PPP" >> $(PKG_BUILD_DIR
)/policy.h
39 echo
"#undef FAX_NOTIFY_PROGRAM" >> $(PKG_BUILD_DIR
)/policy.h
40 echo
"#define FAX_NOTIFY_PROGRAM \"/usr/lib/mgetty+sendfax/new_fax\"" >> $(PKG_BUILD_DIR
)/policy.h
41 echo
"#undef DATA_FLOW" >> $(PKG_BUILD_DIR
)/policy.h
42 echo
"#define DATA_FLOW FLOW_HARD" >> $(PKG_BUILD_DIR
)/policy.h
43 echo
"#undef DEVICE_GROUP" >> $(PKG_BUILD_DIR
)/policy.h
44 echo
"#undef DEVICE_OWNER" >> $(PKG_BUILD_DIR
)/policy.h
45 echo
"#define DEVICE_OWNER \"root\"" >> $(PKG_BUILD_DIR
)/policy.h
46 echo
"#undef FAXREC_FLOW" >> $(PKG_BUILD_DIR
)/policy.h
47 echo
"#define FAXREC_FLOW FLOW_SOFT" >> $(PKG_BUILD_DIR
)/policy.h
48 echo
"#undef FAXSEND_FLOW" >> $(PKG_BUILD_DIR
)/policy.h
49 echo
"#define FAXSEND_FLOW FLOW_SOFT" >> $(PKG_BUILD_DIR
)/policy.h
52 #FIXME: don't manually install, use upstream Makefile instead
54 rm -rf
$(PKG_INSTALL_DIR
)
55 mkdir
-p
$(PKG_INSTALL_DIR
)/usr
/bin
56 mkdir
-p
$(PKG_INSTALL_DIR
)/usr
/sbin
57 mkdir
-p
$(PKG_INSTALL_DIR
)/usr
/lib
/mgetty
+sendfax
58 mkdir
-p
$(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
59 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
61 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
62 $(TARGET_CONFIGURE_OPTS
) \
63 CFLAGS
="$(TARGET_CFLAGS)" \
64 prefix="$(PKG_INSTALL_DIR)/usr" \
65 CONFDIR
=/etc
/mgetty
+sendfax \
67 $(CP
) $(PKG_BUILD_DIR
)/mgetty
$(PKG_INSTALL_DIR
)/usr
/sbin
68 $(CP
) $(PKG_BUILD_DIR
)/sendfax
$(PKG_INSTALL_DIR
)/usr
/sbin
69 $(CP
) $(PKG_BUILD_DIR
)/fax
/faxrunqd
$(PKG_INSTALL_DIR
)/usr
/sbin
70 chmod
755 $(PKG_INSTALL_DIR
)/usr
/sbin
/*
71 $(CP
) $(PKG_BUILD_DIR
)/fax
/faxq-helper
$(PKG_INSTALL_DIR
)/usr
/lib
/mgetty
+sendfax
72 chmod u
+s
$(PKG_INSTALL_DIR
)/usr
/lib
/mgetty
+sendfax
/faxq-helper
73 $(CP
) $(PKG_BUILD_DIR
)/fax
/cour25n.pbm
$(PKG_INSTALL_DIR
)/usr
/lib
/mgetty
+sendfax
74 $(CP
) $(PKG_BUILD_DIR
)/fax
/cour25.pbm
$(PKG_INSTALL_DIR
)/usr
/lib
/mgetty
+sendfax
75 $(CP
) $(PKG_BUILD_DIR
)/fax
/faxq
$(PKG_INSTALL_DIR
)/usr
/bin
76 $(CP
) $(PKG_BUILD_DIR
)/fax
/faxrm
$(PKG_INSTALL_DIR
)/usr
/bin
77 $(CP
) $(PKG_BUILD_DIR
)/fax
/faxrunq
$(PKG_INSTALL_DIR
)/usr
/bin
78 $(CP
) $(PKG_BUILD_DIR
)/fax
/faxspool
$(PKG_INSTALL_DIR
)/usr
/bin
79 $(CP
) $(PKG_BUILD_DIR
)/g3
/g32pbm
$(PKG_INSTALL_DIR
)/usr
/bin
80 (cd
$(PKG_INSTALL_DIR
)/usr
/bin
;\
81 ln
-snf g32pbm g3topbm
;\
83 $(CP
) $(PKG_BUILD_DIR
)/g3
/g3cat
$(PKG_INSTALL_DIR
)/usr
/bin
84 $(CP
) $(PKG_BUILD_DIR
)/g3
/pbm2g3
$(PKG_INSTALL_DIR
)/usr
/bin
85 $(CP
) $(PKG_BUILD_DIR
)/g3
/sff2g3
$(PKG_INSTALL_DIR
)/usr
/bin
86 chmod
755 $(PKG_INSTALL_DIR
)/usr
/bin
/*
87 # Installation into /etc
88 $(CP
) $(PKG_BUILD_DIR
)/dialin.config
$(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
89 $(CP
) $(PKG_BUILD_DIR
)/fax
/faxheader
$(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
90 $(CP
) $(PKG_BUILD_DIR
)/faxrunq.config
$(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
91 $(CP
) $(PKG_BUILD_DIR
)/fax
/faxspool.rules
$(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
/faxspool.rules.sample
92 $(PKG_BUILD_DIR
)/sedscript
< $(PKG_BUILD_DIR
)/login.cfg.in
> $(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
/login.config
93 $(PKG_BUILD_DIR
)/sedscript
< $(PKG_BUILD_DIR
)/mgetty.cfg.in
> $(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
/mgetty.config
94 $(PKG_BUILD_DIR
)/sedscript
< $(PKG_BUILD_DIR
)/sendfax.cfg.in
> $(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
/sendfax.config
97 define Package
/mgetty
/install
98 $(INSTALL_DIR
) $(1)/usr
/bin
100 $(PKG_INSTALL_DIR
)/usr
/bin
/faxq \
101 $(PKG_INSTALL_DIR
)/usr
/bin
/faxrm \
102 $(PKG_INSTALL_DIR
)/usr
/bin
/faxrunq \
103 $(PKG_INSTALL_DIR
)/usr
/bin
/faxspool \
104 $(PKG_INSTALL_DIR
)/usr
/bin
/g32pbm \
105 $(PKG_INSTALL_DIR
)/usr
/bin
/g3cat \
106 $(PKG_INSTALL_DIR
)/usr
/bin
/pbm2g3 \
107 $(PKG_INSTALL_DIR
)/usr
/bin
/sff2g3 \
109 $(INSTALL_DIR
) $(1)/usr
/sbin
111 $(PKG_INSTALL_DIR
)/usr
/sbin
/mgetty \
112 $(PKG_INSTALL_DIR
)/usr
/sbin
/sendfax \
113 $(PKG_INSTALL_DIR
)/usr
/sbin
/faxrunqd \
115 $(INSTALL_DIR
) $(1)/usr
/lib
/mgetty
+sendfax
117 $(PKG_INSTALL_DIR
)/usr
/lib
/mgetty
+sendfax
/faxq-helper \
118 $(1)/usr
/lib
/mgetty
+sendfax
/
120 $(PKG_INSTALL_DIR
)/usr
/lib
/mgetty
+sendfax
/cour25n.pbm \
121 $(PKG_INSTALL_DIR
)/usr
/lib
/mgetty
+sendfax
/cour25.pbm \
122 $(1)/usr
/lib
/mgetty
+sendfax
/
123 $(INSTALL_DIR
) $(1)/etc
/mgetty
+sendfax
125 $(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
/dialin.config \
126 $(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
/faxheader \
127 $(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
/faxrunq.config \
128 $(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
/faxspool.rules.sample \
129 $(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
/login.config \
130 $(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
/mgetty.config \
131 $(PKG_INSTALL_DIR
)/etc
/mgetty
+sendfax
/sendfax.config \
132 $(1)/etc
/mgetty
+sendfax
/
135 $(eval
$(call BuildPackage
,mgetty
))