Below is part of my .spec file:
--------------------------------------------------
%install
install -Dm644 mattermost.service
%{buildroot}/usr/lib/systemd/system/mattermost.service
install -Dm644 mattermost-user.conf
%{buildroot}/usr/lib/sysusers.d/mattermost.conf
%files
%{_libdir}/systemd/system/mattermost.conf
%{_libdir}/sysusers.d/mattermost.conf
----------------------------------------------
which throw two errors when building:
error: File not found:
/home/makerpm/rpmbuild/BUILDROOT/mattermost-3.4-1.fc24.x86_64/usr/lib64/systemd/system/mattermost.conf
error: File not found:
/home/makerpm/rpmbuild/BUILDROOT/mattermost-3.4-1.fc24.x86_64/usr/lib64/sysusers.d/mattermost.conf
I understand I installed these two files in /usr/lib/ (which is what I
want), as said by the below output:
----------------------------------------------------------
+ install -Dm644 mattermost.service
/home/makerpm/rpmbuild/BUILDROOT/mattermost-3.4-1.fc24.x86_64/usr/lib/systemd/system/mattermost.service
+ install -Dm644 mattermost-user.conf
/home/makerpm/rpmbuild/BUILDROOT/mattermost-3.4-1.fc24.x86_64/usr/lib/sysusers.d/mattermost.conf
----------------------------------------------------------
BUT Fedora is looking for them in /usr/lib64, right ?
So %{_libdir} seems to point to /usr/lib64 rather than to /usr/lib as
mentioned in wiki[0].
Am I right? Shall I then write this in %files ? :
/usr/lib/systemd/system/mattermost.conf
/usr/lib/sysusers.d/mattermost.conf
Thank you for help.
[
0]https://fedoraproject.org/wiki/How_to_create_an_RPM_package