1. Bryan O'Sullivan
  2. netplug


Bryan O'Sullivan  committed 90072cd

Make tarball and rpm.

  • Participants
  • Parent commits f38be18
  • Branches default

Comments (0)

Files changed (2)

File Makefile

View file
+version := 1.0
 prefix ?=
 bindir ?= $(prefix)/sbin
 etcdir ?= $(prefix)/etc/netplug
 netplugd: config.o netlink.o lib.o if_info.o main.o
 	$(CC) -o $@ $^
-	-rm -f netplugd *.o
 	install -d $(install_opts) -m 755 $(bindir) $(etcdir) $(scriptdir) \
 	install -C $(install_opts) -m 755 scripts/netplug $(scriptdir)
 	install $(install_opts) -m 755 scripts/rc.netplugd $(initdir)/netplugd
 	/sbin/chkconfig --add netplugd
+bk_root := $(shell bk root)
+tar_root := netplug-$(version)
+tar_file := $(bk_root)/$(tar_root).tar.bz2
+tarball: $(tar_file)
+	bk export -tplain $(bk_root)/$(tar_root)
+	tar -C $(bk_root) -c -f - $(tar_root) | bzip2 -9 > $(tar_file)
+	rm -rf $(bk_root)/$(tar_root)
+rpm: $(tar_file)
+	rpmbuild -ta $(tar_file)
+	-rm -f netplugd *.o *.tar.bz2

File netplug.spec

View file
+Summary: Daemon that responds to network cables being plugged in and out
+Name: netplug
+Version: 1.0
+Release: 1
+License: GPL
+Group: System Environment/Base
+URL: http://www.serpentine.com/~bos/netplug
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+Netplug is a daemon that manages a network interface in response to
+link-level events such as cables being plugged in and out.  When a
+cable is plugged into an interface, the netplug daemon brings that
+interface up.  When the cable is unplugged, the daemon brings that
+interface back down.
+This is extremely useful for systems such as laptops, which are
+constantly being unplugged from one network and plugged into another,
+and for moving systems in a machine room from one switch to another
+without manual intervention required.
+%setup -q
+make install prefix=%{prefix}
+%config %{prefix}/etc/netplug/netplug.conf
+* Tue Aug 26 2003 Bryan O'Sullivan <bos@serpentine.com> - 
+- Initial build.