Commits

Bryan O'Sullivan committed 1014cdb

Build fixes.

  • Participants
  • Parent commits 90072cd

Comments (0)

Files changed (2)

 	install -C $(install_opts) -m 644 etc/netplugd.conf $(etcdir)
 	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
+files := $(shell bk sfiles -Ug)
 
 tarball: $(tar_file)
 
-$(tar_file):
-	bk export -tplain $(bk_root)/$(tar_root)
+$(tar_file): $(files)
+	mkdir -p $(bk_root)/$(tar_root)
+	echo $(files) | tr ' ' '\n' | \
+	  xargs -i cp -a --parents {} $(bk_root)/$(tar_root)
 	tar -C $(bk_root) -c -f - $(tar_root) | bzip2 -9 > $(tar_file)
 	rm -rf $(bk_root)/$(tar_root)
 
 License: GPL
 Group: System Environment/Base
 URL: http://www.serpentine.com/~bos/netplug
-Source0: %{name}-%{version}.tar.gz
+Packager: Bryan O'Sullivan <bos@serpentine.com>
+Source: %{name}-%{version}.tar.bz2
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+Requires: iproute >= 2.4.7
 
 %description
 
 %setup -q
 
 %build
+make
 
 %install
 rm -rf $RPM_BUILD_ROOT
-make install prefix=%{prefix}
+make install prefix=$RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-%{prefix}/sbin/netplugd
-%config %{prefix}/etc/netplug/netplug.conf
-%{prefix}/etc/netplug.d
-%{prefix}/etc/rc.d/init.d/netplugd
+/sbin/netplugd
+%config /etc/netplug/netplugd.conf
+/etc/netplug.d
+/etc/rc.d/init.d/netplugd
 
-%doc
+%post
+/sbin/chkconfig --add netplugd
+
+%postun
+/sbin/chkconfig --del netplugd
 
 
 %changelog