修改安装阶段,动态库应该具有执行权限,否则不出现在provides列表,其他包无法引用;增加配置参数,更新打包文件列表

This commit is contained in:
He Rengui 2021-03-26 10:51:21 +08:00
parent 10c4c2e384
commit 3e7ab65343

View File

@ -1,63 +1,80 @@
#%global debug_package %{nil}
Name: htslib Name: htslib
Version: 1.10.2 Version: 1.10.2
Release: 1 Release: 2
Summary: C library for high-throughput sequencing data formats Summary: C library for high-throughput sequencing data formats
License: MIT and BSD License: MIT and BSD
URL: http://www.htslib.org URL: http://www.htslib.org
Source0: https://github.com/samtools/htslib/archive/%{name}-%{version}.tar.gz Source0: https://github.com/samtools/htslib/archive/%{name}-%{version}.tar.gz
BuildRequires: gcc autoconf automake make curl-devel zlib-devel bzip2-devel xz-devel libxcrypt-devel openssl-devel BuildRequires: gcc autoconf automake make curl-devel zlib-devel bzip2-devel xz-devel libxcrypt-devel openssl-devel
%description %description
HTSlib is an implementation of a unified C library for accessing common file formats, such as SAM, CRAM and VCF, used for high-throughput sequencing data, and is the core library used by samtools and bcftools. HTSlib only depends on zlib. It is known to be compatible with gcc, g++ and clang. HTSlib is an implementation of a unified C library for accessing common file
HTSlib implements a generalized BAM index, with file extension .csi (coordinate-sorted index). The HTSlib file reader first looks for the new index and then for the old if the new index is absent. formats, such as SAM, CRAM and VCF, used for high-throughput sequencing data,
and is the core library used by samtools and bcftools. HTSlib only depends on
zlib. It is known to be compatible with gcc, g++ and clang.
HTSlib implements a generalized BAM index, with file extension .csi (
coordinate-sorted index). The HTSlib file reader first looks for the new index
and then for the old if the new index is absent.
%package devel %package devel
Summary: libs for htslib package Summary: libs for htslib package
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description devel
HTSlib is an implementation of a unified C library for accessing common file formats, such as SAM, CRAM and VCF, used for high-throughput sequencing data, and is the core library used by samtools and bcftools. HTSlib only depends on zlib. It is known to be compatible with gcc, g++ and clang.
HTSlib implements a generalized BAM index, with file extension .csi (coordinate-sorted index). The HTSlib file reader first looks for the new index and then for the old if the new index is absent.
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep %prep
%setup -q -n %{name}-%{version}/ %setup -q -n %{name}-%{version}
%build %build
autoheader autoheader
autoconf autoconf
%configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-gcs --enable-libcurl --enable-s3 %configure --prefix=%{_prefix} \
--libdir=%{_libdir} \
--enable-plugins \
--enable-gcs \
--enable-libcurl \
--enable-s3
%make_build %make_build
# As we don't install libhts.a, the .private keywords are irrelevant.
sed -i -E '/^(Libs|Requires)\.private:/d' htslib.pc.tmp
%install %install
%make_install %make_install
# The dynamic libraries should have execution permissions, otherwise it cannot be referenced by other packages
find %{buildroot}/%{_libdir} -iname "*.so.*" -exec chmod +x {} \;
rm -rf %{buildroot}/%{_libdir}/libhts.a rm -rf %{buildroot}/%{_libdir}/libhts.a
%pre
%preun
%post
%postun
%check
%files %files
%license LICENSE %license LICENSE
%doc README NEWS README.large_positions.md %doc README NEWS README.large_positions.md
%{_bindir}/* %{_bindir}/*
%{_libdir}/libhts.so.* %{_libdir}/libhts.so.*
%{_mandir}/* %dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/hfile_gcs.so
%{_libexecdir}/%{name}/hfile_libcurl.so
%{_libexecdir}/%{name}/hfile_s3.so
%{_libexecdir}/%{name}/hfile_s3_write.so
%{_mandir}/man1/bgzip.1*
%{_mandir}/man1/htsfile.1*
%{_mandir}/man1/tabix.1*
%{_mandir}/man5/faidx.5*
%{_mandir}/man5/sam.5*
%{_mandir}/man5/vcf.5*
%{_mandir}/man7/htslib-s3-plugin.7*
%files devel %files devel
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%{_libdir}/libhts.so %{_libdir}/libhts.so
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/htslib.pc
%{_includedir}/*
%changelog %changelog
* Sun Mar 29 2020 Wei Xiong <myeuler@163.com> * Fri Mar 26 2021 herengui <herengui@uniontech.com> - 1.10.2-2
- Add compilation parameters, update package lists
* Sun Mar 29 2020 Wei Xiong <myeuler@163.com> - 1.10.2-1
- Package init - Package init