Am Mittwoch, den 21.05.2008, 22:40 +0200 schrieb Robert M. Albrecht:
Looks like you took all my suggestions into account, thanks. One last
thing:
Slide 15: You are hardcoding the prefix /usr in the install section.
Instead of
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}
mkdir $RPM_BUILD_ROOT/etc
cp -p usb_modeswitch $RPM_BUILD_ROOT/usr/bin
cp -p usb_modeswitch.conf $RPM_BUILD_ROOT/etc
%doc README* COPYING
I suggest:
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir $RPM_BUILD_ROOT%{_sysconfdir}
install -p -m 755 usb_modeswitch $RPM_BUILD_ROOT%{_bindir}/
install -p -m 644 usb_modeswitch.conf $RPM_BUILD_ROOT%{_sysconfdir}/
I'm also using 'install' instead of 'cp' to make sure permissions are
correct. No need for "%doc README* COPYING" in %install, this belongs
into the %files section where it needs to replace the empty %doc
statement. RPM will care about creating the docdir and installing the
docs.
cu romal
C U @ Berlin
Christoph