diff --git a/.gitignore b/.gitignore index e69de29..cfbd306 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/ledmon-0.1.tar.gz diff --git a/ledmon.spec b/ledmon.spec new file mode 100644 index 0000000..25dbac6 --- /dev/null +++ b/ledmon.spec @@ -0,0 +1,49 @@ +Summary: Enclosure LED Utilities +Name: ledmon +Version: 0.1 +Release: 2%{?dist} +License: GPLv2+ +Group: Applications/System +URL: http://sourceforge.net/projects/ledmon/ +Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Patch0: ledmon_cflags.patch +BuildRequires: perl +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Obsoletes: ledctl = 0.1-1 +Provides: ledctl = %{version}-%{release} + +%description +The ledmon and ledctl are user space applications design to control LED +associated with each slot in an enclosure or a drive bay. There are two +types of system: 2-LED system (Activity LED, Status LED) and 3-LED system +(Activity LED, Locate LED, Fail LED). User must have root privileges to +use this application. + +%prep +%setup -q +%patch0 -p1 -b .cflags + +%build +# can't use smp_flags because -j4 makes the build fail +make CFLAGS="$RPM_OPT_FLAGS --std=c99" + +%install +rm -rf $RPM_BUILD_ROOT +make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT SBIN_DIR=$RPM_BUILD_ROOT/%{_sbindir} MANDIR=$RPM_BUILD_ROOT%{_mandir} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc README COPYING +%{_sbindir}/ledctl +%{_sbindir}/ledmon +%{_mandir}/*/* + +%changelog +* Fri Jan 14 2011 Jiri Moskovcak 0.1-2 +- renamed to ledmon, because ledctl is taken + +* Fri Jan 07 2011 Jiri Moskovcak 0.1-1 +- initial release \ No newline at end of file diff --git a/ledmon_cflags.patch b/ledmon_cflags.patch new file mode 100644 index 0000000..00ae3d5 --- /dev/null +++ b/ledmon_cflags.patch @@ -0,0 +1,10 @@ +--- ledctl_man/src/Makefile 2010-03-23 14:40:33.000000000 +0100 ++++ ledctl/src/Makefile 2011-01-10 15:43:06.066168015 +0100 +@@ -54,7 +54,6 @@ + $(OUTDIR)/ledctl.o \ + $(OBJECTS) + +-CFLAGS=-O0 -g -Wall -std=c99 + DEFFLAGS=-D_DEBUG -D_GNU_SOURCE -D_BSD_SOURCE -DDMALLOC_DISABLE + INCFLAGS=-I../config + LDFLAGS=-O0 -g $(DEFFLAGS) diff --git a/sources b/sources index e69de29..e9daabc 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +0684cd033118babee447d17f0fe77452 ledmon-0.1.tar.gz