Prototype out "autofiles"
The daemon branch landing upstream meant the %files section broke. Let's switch to something more relaxed.
This commit is contained in:
parent
8c4db2a2c0
commit
145a0580a3
@ -49,21 +49,49 @@ make %{?_smp_mflags}
|
|||||||
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p -c"
|
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p -c"
|
||||||
find $RPM_BUILD_ROOT -name '*.la' -delete
|
find $RPM_BUILD_ROOT -name '*.la' -delete
|
||||||
|
|
||||||
%files
|
# I try to do continuous delivery via rpmdistro-gitoverlay while
|
||||||
%doc COPYING README.md
|
# reusing the existing spec files. Currently RPM only supports
|
||||||
%{_bindir}/rpm-ostree
|
# mandatory file entries. What this is doing is making each file
|
||||||
%{_libdir}/%{name}/
|
# entry optional - if it exists it will be picked up. That
|
||||||
%{_mandir}/man*/*.gz
|
# way the same spec file works more easily across multiple versions where e.g. an
|
||||||
%{_libdir}/*.so.1*
|
# older version might not have a systemd unit file.
|
||||||
%{_libdir}/girepository-1.0/*.typelib
|
cat > autofiles.py <<EOF
|
||||||
|
#!/usr/bin/python
|
||||||
|
import os,sys,glob
|
||||||
|
os.chdir(os.environ['RPM_BUILD_ROOT'])
|
||||||
|
for line in sys.argv[1:]:
|
||||||
|
if line == '':
|
||||||
|
break
|
||||||
|
assert(line[0] == '/')
|
||||||
|
files = glob.glob(line[1:])
|
||||||
|
if len(files) > 0:
|
||||||
|
sys.stderr.write('{0} matched {1} files\n'.format(line, len(files)))
|
||||||
|
sys.stdout.write(line)
|
||||||
|
sys.stdout.write('\n')
|
||||||
|
else:
|
||||||
|
sys.stderr.write('{0} did not match any files\n'.format(line))
|
||||||
|
EOF
|
||||||
|
python autofiles.py > files \
|
||||||
|
'%{_bindir}/*' \
|
||||||
|
'%{_libdir}/%{name}' \
|
||||||
|
'%{_libdir}/*.so.*' \
|
||||||
|
'%{_mandir}/man*/*' \
|
||||||
|
'%{_libdir}/girepository-1.0/*.typelib' \
|
||||||
|
'%{_sysconfdir}/dbus-1/system.d/*' \
|
||||||
|
'%{_prefix}/lib/systemd/system/*' \
|
||||||
|
'%{_libexecdir}/rpm-ostree*' \
|
||||||
|
'%{_datadir}/dbus-1/system-services'
|
||||||
|
python autofiles.py > files.devel \
|
||||||
|
'%{_libdir}/lib*.so' \
|
||||||
|
'%{_includedir}/*' \
|
||||||
|
'%{_libdir}/pkgconfig/*' \
|
||||||
|
'%{_datadir}/gtk-doc/html/*' \
|
||||||
|
'%{_datadir}/gir-1.0/*-1.0.gir'
|
||||||
|
|
||||||
%files devel
|
%files -f files
|
||||||
%{_libdir}/lib*.so
|
%doc COPYING README.md
|
||||||
%{_includedir}/*
|
|
||||||
%{_libdir}/pkgconfig/*
|
%files -f files.devel
|
||||||
%dir %{_datadir}/gtk-doc/html/*
|
|
||||||
%{_datadir}/gtk-doc/html/*
|
|
||||||
%{_datadir}/gir-1.0/*-1.0.gir
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat Sep 05 2015 Kalev Lember <klember@redhat.com> - 2015.9-2
|
* Sat Sep 05 2015 Kalev Lember <klember@redhat.com> - 2015.9-2
|
||||||
|
Loading…
Reference in New Issue
Block a user