Commits

Bryan O'Sullivan  committed 531c58a

Add fedora target

  • Participants
  • Parent commits ad7f246

Comments (0)

Files changed (3)

-version := $(shell awk '/%define version/{print $$3}' netplug.spec)
+version := 1.2.1
 
 prefix ?=
 bindir ?= $(prefix)/sbin
 rpm: $(tar_file)
 	rpmbuild -ta $(tar_file)
 
+fedora: $(tar_file)
+	rpmbuild --define 'release 0.fdr.1' -ta $(tar_file)
+
 clean:
 	-rm -f netplugd *.o *.tar.bz2
 
     if (attrs[IFLA_IFNAME] == NULL) {
         do_log(LOG_ERR, "No interface name");
-        return -1;
+        exit(1);
     }
 
     char *name = RTA_DATA(attrs[IFLA_IFNAME]);

File netplug.spec

-%define version 1.2.1
-%define release 1
-%define sysconfig /etc/sysconfig/network-scripts
+%define version 1.2
+%define release 2
+%define sysconfig %{_sysconfdir}/sysconfig/network-scripts
 
 Summary: Daemon that responds to network cables being plugged in and out
 Name: netplug
 
 %files
 %defattr(-,root,root,-)
+%config %{_sysconfdir}/netplug/netplugd.conf
+%{_sysconfdir}/netplug.d
+%{_sysconfdir}/netplug
+%{_initrddir}/netplugd
 /sbin/netplugd
-%config /etc/netplug/netplugd.conf
-/etc/netplug.d
-/etc/rc.d/init.d/netplugd
-%docdir /usr/share/man/*
-/usr/share/man/*/*
+%{_mandir}/man*/*
 
 %doc COPYING ChangeLog README TODO