minicom.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. ##
  2. ## minicom.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: minicom
  27. Summary: Serial Line Terminal Program
  28. URL: http://alioth.debian.org/projects/minicom/
  29. Vendor: Jukka Lahtinen
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [BASE]
  32. Group: Communication
  33. License: BSD
  34. Version: 2.1
  35. Release: 20030529
  36. # list of sources
  37. Source0: http://alioth.debian.org/download.php/123/minicom-%{version}.tar.gz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20020206, lrzsz, make
  42. PreReq: OpenPKG, openpkg >= 20020206, lrzsz
  43. AutoReq: no
  44. AutoReqProv: no
  45. %description
  46. Minicom is a terminal program for serial line communications.
  47. %prep
  48. %setup -q
  49. %build
  50. # determine default serial device
  51. device="/dev/modem"
  52. lockdir="/var/lock"
  53. case "%{l_target}" in
  54. *-freebsd* ) device=/dev/cuaa0; lockdir=/var/spool/lock ;;
  55. *-linux* ) device=/dev/ttyS0; lockdir=/var/lock ;;
  56. *-solaris* ) device=/dev/cua/a; lockdir=/var/spool/locks ;;
  57. esac
  58. # configure sources
  59. CC="%{l_cc}" \
  60. CFLAGS="%{l_cflags -O}" \
  61. ./configure \
  62. --prefix=%{l_prefix} \
  63. --sysconfdir=%{l_prefix}/etc/minicom \
  64. --enable-lock-dir=$lockdir \
  65. --enable-dfl-port=$device \
  66. --disable-nls
  67. # build programs
  68. %{l_make} %{l_mflags -O}
  69. %install
  70. rm -rf $RPM_BUILD_ROOT
  71. # pre-create installation area
  72. %{l_shtool} mkdir -f -p -m 755 \
  73. $RPM_BUILD_ROOT%{l_prefix}/bin \
  74. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  75. $RPM_BUILD_ROOT%{l_prefix}/etc/minicom \
  76. $RPM_BUILD_ROOT%{l_prefix}/share/minicom
  77. # install programs
  78. %{l_make} %{l_mflags} install \
  79. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  80. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  81. # add configuration files
  82. %{l_shtool} install -c -m 644 \
  83. -e 's;^ALL;#ALL;' \
  84. doc/minicom.users $RPM_BUILD_ROOT%{l_prefix}/etc/minicom/
  85. echo "root" >>$RPM_BUILD_ROOT%{l_prefix}/etc/minicom/minicom.users
  86. ( echo "pu baudrate 9600"
  87. echo "pu bits 8"
  88. echo "pu parity N"
  89. echo "pu stopbits 1"
  90. ) >minirc.dfl
  91. %{l_shtool} install -c -m 644 \
  92. minirc.dfl $RPM_BUILD_ROOT%{l_prefix}/etc/minicom/
  93. # strip binaries
  94. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  95. # determine installation files
  96. attr="4755,uucp,%{l_mgrp}"
  97. case "%{l_target}" in
  98. *-freebsd* ) attr="6755,uucp,dialer" ;;
  99. *-linux* ) attr="2755,%{l_musr},`ls -l /dev/ttyS0 | awk '{print $4;}'`" ;;
  100. *-solaris* ) attr="4755,uucp,%{l_mgrp}" ;;
  101. esac
  102. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  103. %{l_files_std} \
  104. "%config %{l_prefix}/etc/minicom/*" \
  105. "%attr($attr) %{l_prefix}/bin/minicom"
  106. %files -f files
  107. %clean
  108. rm -rf $RPM_BUILD_ROOT