SPECS: hwreport.spec - better Makefile - kill unneeded BR - adapte...
shadzik
shadzik at pld-linux.org
Thu Jul 19 17:36:51 CEST 2007
Author: shadzik Date: Thu Jul 19 15:36:51 2007 GMT
Module: SPECS Tag: HEAD
---- Log message:
- better Makefile
- kill unneeded BR
- adapterize
- use make install to install all in %{_sbindir}
---- Files affected:
SPECS:
hwreport.spec (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SPECS/hwreport.spec
diff -u SPECS/hwreport.spec:1.1 SPECS/hwreport.spec:1.2
--- SPECS/hwreport.spec:1.1 Thu Jul 19 17:00:01 2007
+++ SPECS/hwreport.spec Thu Jul 19 17:36:46 2007
@@ -4,7 +4,7 @@
# - checkup, bump to 1.0 and build
#
Summary: Collect system informations for the hardware4linux site
-Summary(pl.UTF-8): Zbiera informacje dla strony hardware4linux
+Summary(pl.UTF-8): Zbiera informacje dla strony hardware4linux
Name: hwreport
Version: 0.9
Release: 0.1
@@ -13,8 +13,7 @@
Source0: http://hardware4linux.info/res/%{name}-%{version}.tar.bz2
# Source0-md5: 47612077f8a00ddb8c9e6c1480c63f63
URL: http://hardware4linux.info/
-BuildRequires: gcc
-Requires: dmidecode
+Requires: dmidecode
Requires: pciutils
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -24,36 +23,59 @@
http://hardware4linux.info.
It works both ways -- you can get information about the drivers and
-compatibility of your hardware from the site and submit new entries to the
-hardware4linux site.
+compatibility of your hardware from the site and submit new entries to
+the hardware4linux site.
%description -l pl.UTF-8
-Hwreport używa skryptu hwreport i scan-printers do rozpoznawania sprzętu w
-Twoim PC-ie i porównywanie go ze listą kompatybilności na stronie
-http://hardware4linux.info.
+Hwreport używa skryptu hwreport i scan-printers do rozpoznawania
+sprzętu w Twoim PC-ie i porównywanie go ze listą kompatybilności na
+stronie http://hardware4linux.info.
To działa w obie strony -- możesz pobierać informację na temat
-sterowników i kompatybilności Twojego sprzętu ze strony lub wysyłać nowe
-wpisy do strony hardware4linux.
+sterowników i kompatybilności Twojego sprzętu ze strony lub wysyłać
+nowe wpisy do strony hardware4linux.
%prep
%setup -q
+cat > Makefile <<'EOF'
+TARGET = scan-printers
+INSTALL = %{_bindir}/install -c
+OBJECTS = scan-printers.o
+BINARIES = osinfo hwreport
+sbindir = %{_sbindir}
+all: Makefile $(TARGET)
+$(TARGET): $(OBJECTS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJECTS)
+
+clean:
+ rm -f $(OBJECTS) $(TARGET)
+
+scan-printers.o: scan-printers.c
+
+install:
+ $(INSTALL) $(TARGET) $(DESTDIR)/$(sbindir)
+ $(INSTALL) $(BINARIES) $(DESTDIR)/$(sbindir)
+EOF
%build
-%{__make}
+%{__make} \
+ CC="%{__cc}"
+ CFLAGS="%{rpmcflags}" \
+ LDFLAGS="%{rpmldflags}"
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_bindir}
+install -d $RPM_BUILD_ROOT%{_sbindir}
-install {hwreport,osinfo,scan-printers} $RPM_BUILD_ROOT%{_bindir}
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_sbindir}/*
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -61,6 +83,12 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.2 2007/07/19 15:36:46 shadzik
+- better Makefile
+- kill unneeded BR
+- adapterize
+- use make install to install all in %{_sbindir}
+
Revision 1.1 2007/07/19 15:00:01 czarny
- init
- s/b(tm) check it and bump to 1.0
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/hwreport.spec?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list