init script cleanup, use /etc/rc.d/ for enabled scripts, /etc/init.d/<pkgname> (enabl...
[packages.git] / utils / setserial / Makefile
1
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=setserial
12 PKG_VERSION:=2.17
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@SF/setserial
18 PKG_MD5SUM:=c4867d72c41564318e0107745eb7a0f2
19 PKG_CAT:=zcat
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/setserial
24   SECTION:=utils
25   CATEGORY:=Utilities
26   TITLE:=Serial port configuration utility
27   DESCRIPTION:=Serial port configuration utility.\\\
28     setserial  is a program designed to set and/or report the \\\
29     configuration information associated with a serial port. This \\\
30     information  includes what I/O port and IRQ a particular \\\
31     serial port is using, and whether or not the break key should \\\
32     be interpreted as the Secure Attention Key, and so on.
33   URL:=http://setserial.sourceforge.net/
34 endef
35
36 define Build/Configure
37         (cd $(PKG_BUILD_DIR); rm -f config.cache; \
38                 $(TARGET_CONFIGURE_OPTS) \
39                 ./configure \
40                         --target=$(GNU_TARGET_NAME) \
41                         --host=$(GNU_TARGET_NAME) \
42                         --build=$(GNU_HOST_NAME) \
43                         --program-prefix="" \
44                         --program-suffix="" \
45                         --prefix=/usr \
46                         --exec-prefix=/usr \
47                         --bindir=/usr/bin \
48                         --datadir=/usr/share \
49                         --includedir=/usr/include \
50                         --infodir=/usr/share/info \
51                         --libdir=/usr/lib \
52                         --libexecdir=/usr/lib \
53                         --localstatedir=/var \
54                         --mandir=/usr/share/man \
55                         --sbindir=/usr/sbin \
56                         --sysconfdir=/etc \
57                         $(DISABLE_LARGEFILE) \
58                         $(DISABLE_NLS) \
59         );
60 endef
61
62 define Build/Compile
63         $(MAKE) -C $(PKG_BUILD_DIR) \
64                 all
65 endef
66
67 define Package/setserial/install
68         install -d -m0755 $(1)/etc/init.d
69         install -m0755 ./files/serial.init $(1)/etc/init.d/setserial
70         ln -sf setserial $(1)/etc/init.d/setserial
71         install -d -m0755 $(1)/usr/sbin
72         install -m0755 $(PKG_BUILD_DIR)/setserial $(1)/usr/sbin/
73 endef
74
75 $(eval $(call BuildPackage,setserial))