Rebase for hostname 3.23 59/219259/1
authorAnas Nashif <anas.nashif@intel.com>
Sun, 9 Dec 2012 19:32:56 +0000 (11:32 -0800)
committerHyunjee Kim <hj0426.kim@samsung.com>
Wed, 4 Dec 2019 01:48:13 +0000 (10:48 +0900)
Change-Id: I72e4a0d9c6bd1930129a923dd208f5446891aa56
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
Makefile
packaging/hostname.changes [new file with mode: 0644]
packaging/hostname.manifest [new file with mode: 0644]
packaging/hostname.spec [new file with mode: 0644]

index c473641..03a949a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,22 +9,18 @@ MANDIR:=/usr/share/man
 OBJS=hostname.o
 
 hostname: $(OBJS)
-       $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)
-       ln -fs hostname dnsdomainname
-       ln -fs hostname domainname
-       ln -fs hostname ypdomainname
-       ln -fs hostname nisdomainname
+       $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS) -lnsl
 
 install: hostname
        install -d ${BASEDIR}$(MANDIR)/man1
-       install -o root -g root -m 0644 hostname.1 ${BASEDIR}$(MANDIR)/man1
+       install -m 0644 hostname.1 ${BASEDIR}$(MANDIR)/man1
        ln -fs hostname.1 ${BASEDIR}$(MANDIR)/man1/dnsdomainname.1
        ln -fs hostname.1 ${BASEDIR}$(MANDIR)/man1/domainname.1
        ln -fs hostname.1 ${BASEDIR}$(MANDIR)/man1/ypdomainname.1
        ln -fs hostname.1 ${BASEDIR}$(MANDIR)/man1/nisdomainname.1
 
        install -d ${BASEDIR}$(BINDIR)
-       install -o root -g root -m 0755 hostname ${BASEDIR}$(BINDIR)
+       install -m 0755 hostname ${BASEDIR}$(BINDIR)
        ln -fs hostname ${BASEDIR}$(BINDIR)/dnsdomainname
        ln -fs hostname ${BASEDIR}$(BINDIR)/domainname
        ln -fs hostname ${BASEDIR}$(BINDIR)/nisdomainname
diff --git a/packaging/hostname.changes b/packaging/hostname.changes
new file mode 100644 (file)
index 0000000..9f9a352
--- /dev/null
@@ -0,0 +1,3 @@
+* Fri Dec 14 2012 Anas Nashif <anas.nashif@intel.com> upstream/3.12@4b2f5fe
+- initial release
+
diff --git a/packaging/hostname.manifest b/packaging/hostname.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/hostname.spec b/packaging/hostname.spec
new file mode 100644 (file)
index 0000000..3b1d704
--- /dev/null
@@ -0,0 +1,30 @@
+Name:           hostname
+Version:        3.20
+Release:        0
+License:        GPL-2.0+
+Summary:        Utility to set/show the host name or domain name
+Url:            http://packages.qa.debian.org/h/hostname.html
+Group:          System/Base
+Source0:        http://ftp.de.debian.org/debian/pool/main/h/hostname/hostname_%{version}.tar.gz
+Source1001:    hostname.manifest
+
+%description
+This package provides commands which can be used to display the system's
+DNS name, and to display or set its hostname or NIS domain name.
+
+%prep
+%setup -q -n hostname
+cp %{SOURCE1001} .
+
+%build
+make CFLAGS="%{optflags} $CFLAGS -D_GNU_SOURCE "
+
+%install
+make BASEDIR=%{buildroot} install
+
+%remove_docs
+
+%files 
+%manifest %{name}.manifest
+%license COPYRIGHT
+/bin/*