Am 28.07.2013 20:08, schrieb আনন্দ কুমার সমাদ্দার Ananda Samaddar:
On Sun, 28 Jul 2013 20:01:42 +0200
Reindl Harald <h.reindl(a)thelounge.net> wrote:
> Am 28.07.2013 19:57, schrieb আনন্দ কুমার সমাদ্দার Ananda Samaddar:
>> I can get kwakd to build and package properly apart from one thing.
>> The systemd service file needs to be copied to the appropriate
>> directory and it doesn't seem to be working. Here are the relevant
>> parts of the spec file:
>>
>> %install
>> make install DESTDIR=$RPM_BUILD_ROOT
>> cp %{name}.service %{_unitdir}
>
> *anything* inside install has to use the %{buildroot}% macro
> cp %{name}.service %{buildroot}%{_unitdir}/
>
It's still not working. I have:
BuildRequires: systemd
In the spec file.
With your suggestion I get the following error:
+ cp
kwakd.service
/home/ananda/rpmbuild/BUILDROOT/kwakd-0.3-1.fc19.x86_64/usr/lib/systemd/system/
cp: cannot create regular file
'/home/ananda/rpmbuild/BUILDROOT/kwakd-0.3-1.fc19.x86_64/usr/lib/systemd/system/':
No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.7hHDNH (%install)
mkdir %{buildroot}%{_unitdir}/
cp %{name}.service %{buildroot}%{_unitdir}/
"%{name}.service" is usually in rpmbuild/SOURCES/
look at existing src.rpms, thats how i learned to build packages