Makefile 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= mgetty
  5. PKG_VERSION:= 1.1.36
  6. PKG_XVERSION:= Jun15
  7. PKG_RELEASE:= 1
  8. PKG_MD5SUM:= 0320e98c6b86bcca48fc5f355b94ead4
  9. PKG_DESCR:= mgetty + sendfax
  10. PKG_SECTION:= misc
  11. PKG_SITES:= ftp://alpha.greenie.net/pub/mgetty/source/1.1/
  12. DISTFILES:= ${PKG_NAME}${PKG_VERSION}-${PKG_XVERSION}.tar.gz
  13. include ${TOPDIR}/mk/package.mk
  14. $(eval $(call PKG_template,MGETTY,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  15. pre-configure:
  16. cp ${WRKBUILD}/policy.h-dist ${WRKBUILD}/policy.h
  17. echo "#define AUTO_PPP" >> ${WRKBUILD}/policy.h
  18. echo "#undef FAX_NOTIFY_PROGRAM" >> ${WRKBUILD}/policy.h
  19. echo "#define FAX_NOTIFY_PROGRAM \"/usr/lib/mgetty+sendfax/new_fax\"" >> ${WRKBUILD}/policy.h
  20. echo "#undef DATA_FLOW" >> ${WRKBUILD}/policy.h
  21. echo "#define DATA_FLOW FLOW_HARD" >> ${WRKBUILD}/policy.h
  22. echo "#undef DEVICE_GROUP" >> ${WRKBUILD}/policy.h
  23. echo "#undef DEVICE_OWNER" >> ${WRKBUILD}/policy.h
  24. echo "#define DEVICE_OWNER \"root\"" >> ${WRKBUILD}/policy.h
  25. echo "#undef FAXREC_FLOW" >> ${WRKBUILD}/policy.h
  26. echo "#define FAXREC_FLOW FLOW_SOFT" >> ${WRKBUILD}/policy.h
  27. echo "#undef FAXSEND_FLOW" >> ${WRKBUILD}/policy.h
  28. echo "#define FAXSEND_FLOW FLOW_SOFT" >> ${WRKBUILD}/policy.h
  29. do-build:
  30. ${INSTALL_DIR} ${WRKINST}/usr/bin ${WRKINST}/usr/sbin
  31. ${INSTALL_DIR} ${WRKINST}/usr/lib/mgetty+sendfax ${WRKINST}/etc/mgetty+sendfax
  32. ${MAKE} -C ${WRKBUILD} \
  33. ${TARGET_CONFIGURE_OPTS} \
  34. prefix="${WRKINST}/usr" \
  35. CONFDIR=/etc/mgetty+sendfax \
  36. bin-all
  37. ${INSTALL_BIN} ${WRKBUILD}/mgetty ${WRKINST}/usr/sbin
  38. ${INSTALL_BIN} ${WRKBUILD}/sendfax ${WRKINST}/usr/sbin
  39. ${INSTALL_BIN} ${WRKBUILD}/fax/faxrunqd ${WRKINST}/usr/sbin
  40. ${CP} ${WRKBUILD}/fax/faxq-helper ${WRKINST}/usr/lib/mgetty+sendfax
  41. chmod u+s ${WRKINST}/usr/lib/mgetty+sendfax/faxq-helper
  42. ${CP} ${WRKBUILD}/fax/cour25n.pbm ${WRKINST}/usr/lib/mgetty+sendfax
  43. ${CP} ${WRKBUILD}/fax/cour25.pbm ${WRKINST}/usr/lib/mgetty+sendfax
  44. ${CP} ${WRKBUILD}/fax/faxq ${WRKINST}/usr/bin
  45. ${CP} ${WRKBUILD}/fax/faxrm ${WRKINST}/usr/bin
  46. ${CP} ${WRKBUILD}/fax/faxrunq ${WRKINST}/usr/bin
  47. ${CP} ${WRKBUILD}/fax/faxspool ${WRKINST}/usr/bin
  48. ${CP} ${WRKBUILD}/g3/g32pbm ${WRKINST}/usr/bin
  49. (cd ${WRKINST}/usr/bin;\
  50. ln -snf g32pbm g3topbm;\
  51. );
  52. ${INSTALL_BIN} ${WRKBUILD}/g3/g3cat ${WRKINST}/usr/bin
  53. ${INSTALL_BIN} ${WRKBUILD}/g3/pbm2g3 ${WRKINST}/usr/bin
  54. ${INSTALL_BIN} ${WRKBUILD}/g3/sff2g3 ${WRKINST}/usr/bin
  55. # Installation into /etc
  56. ${CP} ${WRKBUILD}/dialin.config ${WRKINST}/etc/mgetty+sendfax
  57. ${CP} ${WRKBUILD}/fax/faxheader ${WRKINST}/etc/mgetty+sendfax
  58. ${CP} ${WRKBUILD}/faxrunq.config ${WRKINST}/etc/mgetty+sendfax
  59. ${CP} ${WRKBUILD}/fax/faxspool.rules ${WRKINST}/etc/mgetty+sendfax/faxspool.rules.sample
  60. ${WRKBUILD}/sedscript < ${WRKBUILD}/login.cfg.in > ${WRKINST}/etc/mgetty+sendfax/login.config
  61. ${WRKBUILD}/sedscript < ${WRKBUILD}/mgetty.cfg.in > ${WRKINST}/etc/mgetty+sendfax/mgetty.config
  62. ${WRKBUILD}/sedscript < ${WRKBUILD}/sendfax.cfg.in > ${WRKINST}/etc/mgetty+sendfax/sendfax.config
  63. ISBIN:=${IDIR_MGETTY}/usr/sbin
  64. IBIN:=${IDIR_MGETTY}/usr/bin
  65. ILIB:=${IDIR_MGETTY}/usr/lib/mgetty+sendfax
  66. IETC:=${IDIR_MGETTY}/etc/mgetty+sendfax
  67. do-install:
  68. ${INSTALL_DIR} ${ISBIN} ${IBIN} ${ILIB} ${IETC}
  69. ${INSTALL_BIN} \
  70. ${WRKINST}/usr/bin/faxq \
  71. ${WRKINST}/usr/bin/faxrm \
  72. ${WRKINST}/usr/bin/faxrunq \
  73. ${WRKINST}/usr/bin/faxspool \
  74. ${WRKINST}/usr/bin/g32pbm \
  75. ${WRKINST}/usr/bin/g3cat \
  76. ${WRKINST}/usr/bin/pbm2g3 \
  77. ${WRKINST}/usr/bin/sff2g3 \
  78. ${IBIN}
  79. ${INSTALL_BIN} \
  80. ${WRKINST}/usr/sbin/mgetty \
  81. ${WRKINST}/usr/sbin/sendfax \
  82. ${WRKINST}/usr/sbin/faxrunqd \
  83. ${ISBIN}
  84. install -m4755 \
  85. ${WRKINST}/usr/lib/mgetty+sendfax/faxq-helper \
  86. ${ILIB}
  87. ${INSTALL_DATA} \
  88. ${WRKINST}/usr/lib/mgetty+sendfax/cour25n.pbm \
  89. ${WRKINST}/usr/lib/mgetty+sendfax/cour25.pbm \
  90. ${ILIB}
  91. install -m600 \
  92. ${WRKINST}/etc/mgetty+sendfax/dialin.config \
  93. ${WRKINST}/etc/mgetty+sendfax/faxheader \
  94. ${WRKINST}/etc/mgetty+sendfax/faxrunq.config \
  95. ${WRKINST}/etc/mgetty+sendfax/faxspool.rules.sample \
  96. ${WRKINST}/etc/mgetty+sendfax/login.config \
  97. ${WRKINST}/etc/mgetty+sendfax/mgetty.config \
  98. ${WRKINST}/etc/mgetty+sendfax/sendfax.config \
  99. ${IETC}
  100. include ${TOPDIR}/mk/pkg-bottom.mk