Makefile 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 ${ADK_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:= sys/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 ${ADK_TOPDIR}/mk/package.mk
  14. $(eval $(call PKG_template,MGETTY,mgetty,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  15. CONFIG_STYLE:= manual
  16. BUILD_STYLE:= manual
  17. INSTALL_STYLE:= manual
  18. pre-configure:
  19. cp ${WRKBUILD}/policy.h-dist ${WRKBUILD}/policy.h
  20. echo "#define AUTO_PPP" >> ${WRKBUILD}/policy.h
  21. echo "#undef FAX_NOTIFY_PROGRAM" >> ${WRKBUILD}/policy.h
  22. echo "#define FAX_NOTIFY_PROGRAM \"/usr/lib/mgetty+sendfax/new_fax\"" >> ${WRKBUILD}/policy.h
  23. echo "#undef DATA_FLOW" >> ${WRKBUILD}/policy.h
  24. echo "#define DATA_FLOW FLOW_HARD" >> ${WRKBUILD}/policy.h
  25. echo "#undef DEVICE_GROUP" >> ${WRKBUILD}/policy.h
  26. echo "#undef DEVICE_OWNER" >> ${WRKBUILD}/policy.h
  27. echo "#define DEVICE_OWNER \"root\"" >> ${WRKBUILD}/policy.h
  28. echo "#undef FAXREC_FLOW" >> ${WRKBUILD}/policy.h
  29. echo "#define FAXREC_FLOW FLOW_SOFT" >> ${WRKBUILD}/policy.h
  30. echo "#undef FAXSEND_FLOW" >> ${WRKBUILD}/policy.h
  31. echo "#define FAXSEND_FLOW FLOW_SOFT" >> ${WRKBUILD}/policy.h
  32. do-build:
  33. ${INSTALL_DIR} ${WRKINST}/usr/bin ${WRKINST}/usr/sbin
  34. ${INSTALL_DIR} ${WRKINST}/usr/lib/mgetty+sendfax ${WRKINST}/etc/mgetty+sendfax
  35. ${MAKE} -C ${WRKBUILD} \
  36. ${TARGET_CONFIGURE_OPTS} \
  37. prefix="${WRKINST}/usr" \
  38. CONFDIR=/etc/mgetty+sendfax \
  39. bin-all
  40. ${INSTALL_BIN} ${WRKBUILD}/mgetty ${WRKINST}/usr/sbin
  41. ${INSTALL_BIN} ${WRKBUILD}/sendfax ${WRKINST}/usr/sbin
  42. ${INSTALL_BIN} ${WRKBUILD}/fax/faxrunqd ${WRKINST}/usr/sbin
  43. ${CP} ${WRKBUILD}/fax/faxq-helper ${WRKINST}/usr/lib/mgetty+sendfax
  44. chmod u+s ${WRKINST}/usr/lib/mgetty+sendfax/faxq-helper
  45. ${CP} ${WRKBUILD}/fax/cour25n.pbm ${WRKINST}/usr/lib/mgetty+sendfax
  46. ${CP} ${WRKBUILD}/fax/cour25.pbm ${WRKINST}/usr/lib/mgetty+sendfax
  47. ${CP} ${WRKBUILD}/fax/faxq ${WRKINST}/usr/bin
  48. ${CP} ${WRKBUILD}/fax/faxrm ${WRKINST}/usr/bin
  49. ${CP} ${WRKBUILD}/fax/faxrunq ${WRKINST}/usr/bin
  50. ${CP} ${WRKBUILD}/fax/faxspool ${WRKINST}/usr/bin
  51. ${CP} ${WRKBUILD}/g3/g32pbm ${WRKINST}/usr/bin
  52. (cd ${WRKINST}/usr/bin;\
  53. ln -snf g32pbm g3topbm;\
  54. );
  55. ${INSTALL_BIN} ${WRKBUILD}/g3/g3cat ${WRKINST}/usr/bin
  56. ${INSTALL_BIN} ${WRKBUILD}/g3/pbm2g3 ${WRKINST}/usr/bin
  57. ${INSTALL_BIN} ${WRKBUILD}/g3/sff2g3 ${WRKINST}/usr/bin
  58. # Installation into /etc
  59. ${CP} ${WRKBUILD}/dialin.config ${WRKINST}/etc/mgetty+sendfax
  60. ${CP} ${WRKBUILD}/fax/faxheader ${WRKINST}/etc/mgetty+sendfax
  61. ${CP} ${WRKBUILD}/faxrunq.config ${WRKINST}/etc/mgetty+sendfax
  62. ${CP} ${WRKBUILD}/fax/faxspool.rules ${WRKINST}/etc/mgetty+sendfax/faxspool.rules.sample
  63. ${WRKBUILD}/sedscript < ${WRKBUILD}/login.cfg.in > ${WRKINST}/etc/mgetty+sendfax/login.config
  64. ${WRKBUILD}/sedscript < ${WRKBUILD}/mgetty.cfg.in > ${WRKINST}/etc/mgetty+sendfax/mgetty.config
  65. ${WRKBUILD}/sedscript < ${WRKBUILD}/sendfax.cfg.in > ${WRKINST}/etc/mgetty+sendfax/sendfax.config
  66. ISBIN:=${IDIR_MGETTY}/usr/sbin
  67. IBIN:=${IDIR_MGETTY}/usr/bin
  68. ILIB:=${IDIR_MGETTY}/usr/lib/mgetty+sendfax
  69. IETC:=${IDIR_MGETTY}/etc/mgetty+sendfax
  70. do-install:
  71. ${INSTALL_DIR} ${ISBIN} ${IBIN} ${ILIB} ${IETC}
  72. ${INSTALL_BIN} \
  73. ${WRKINST}/usr/bin/faxq \
  74. ${WRKINST}/usr/bin/faxrm \
  75. ${WRKINST}/usr/bin/faxrunq \
  76. ${WRKINST}/usr/bin/faxspool \
  77. ${WRKINST}/usr/bin/g32pbm \
  78. ${WRKINST}/usr/bin/g3cat \
  79. ${WRKINST}/usr/bin/pbm2g3 \
  80. ${WRKINST}/usr/bin/sff2g3 \
  81. ${IBIN}
  82. ${INSTALL_BIN} \
  83. ${WRKINST}/usr/sbin/mgetty \
  84. ${WRKINST}/usr/sbin/sendfax \
  85. ${WRKINST}/usr/sbin/faxrunqd \
  86. ${ISBIN}
  87. install -m4755 \
  88. ${WRKINST}/usr/lib/mgetty+sendfax/faxq-helper \
  89. ${ILIB}
  90. ${INSTALL_DATA} \
  91. ${WRKINST}/usr/lib/mgetty+sendfax/cour25n.pbm \
  92. ${WRKINST}/usr/lib/mgetty+sendfax/cour25.pbm \
  93. ${ILIB}
  94. install -m600 \
  95. ${WRKINST}/etc/mgetty+sendfax/dialin.config \
  96. ${WRKINST}/etc/mgetty+sendfax/faxheader \
  97. ${WRKINST}/etc/mgetty+sendfax/faxrunq.config \
  98. ${WRKINST}/etc/mgetty+sendfax/faxspool.rules.sample \
  99. ${WRKINST}/etc/mgetty+sendfax/login.config \
  100. ${WRKINST}/etc/mgetty+sendfax/mgetty.config \
  101. ${WRKINST}/etc/mgetty+sendfax/sendfax.config \
  102. ${IETC}
  103. include ${ADK_TOPDIR}/mk/pkg-bottom.mk