#1 Add configure script.
Merged 3 years ago by jaruga. Opened 3 years ago by jaruga.
rpms/ jaruga/htslib feature/add-configure  into  master

file modified
+30 -6
@@ -3,7 +3,7 @@ 

  

  Name:           htslib

  Version:        1.9

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        C library for high-throughput sequencing data formats

  

  # The entire source code is MIT/Expat except cram/ which is Modified-BSD.
@@ -16,6 +16,8 @@ 

  

  BuildRequires:  gcc

  BuildRequires:  bzip2-devel

+ BuildRequires:  libcurl-devel

+ BuildRequires:  openssl-devel

  BuildRequires:  xz-devel

  BuildRequires:  zlib-devel

  
@@ -47,10 +49,18 @@ 

  %setup -q

  

  %build

- %make_build CFLAGS="%{optflags}" LDFLAGS="%{build_ldflags}"

+ %configure CFLAGS="%{optflags}" LDFLAGS="%{build_ldflags}" \

+     --prefix=%{_prefix} \

+     --libdir=%{_libdir} \

+     --enable-plugins \

+     --with-plugin-path='%{_usr}/local/libexec/htslib:$(plugindir)' \

+     --enable-gcs \

+     --enable-libcurl \

+     --enable-s3

+ %make_build

  

  %install

- %make_install prefix=%{_prefix} libdir=%{_libdir}

+ %make_install

  pushd %{buildroot}/%{_libdir}

  chmod 755 libhts.so.%{version}

  popd
@@ -65,14 +75,20 @@ 

  %doc NEWS

  %{_libdir}/libhts.so.%{version}

  %{_libdir}/libhts.so.%{so_version}

+ # The plugin so files should be in the main package,

+ # as they are loaded when libhts.so.%%{so_version} is used.

+ %{_libexecdir}/%{name}/hfile_gcs.so

+ %{_libexecdir}/%{name}/hfile_libcurl.so

+ %{_libexecdir}/%{name}/hfile_s3.so

+ # The man5 pages are aimed at users.

+ %{_mandir}/man5/faidx.5*

+ %{_mandir}/man5/sam.5*

+ %{_mandir}/man5/vcf.5*

  

  %files devel

  %{_includedir}/htslib

  %{_libdir}/libhts.so

  %{_libdir}/pkgconfig/htslib.pc

- %{_mandir}/man5/faidx.5*

- %{_mandir}/man5/sam.5*

- %{_mandir}/man5/vcf.5*

  

  %files tools

  %{_bindir}/bgzip
@@ -84,6 +100,14 @@ 

  

  

  %changelog

+ * Tue Oct 22 2019 Jun Aruga <jaruga@redhat.com> - 1.9-2

+ - Add configure script.

+ - Enable separately-compiled plugins.

+ - Enable support for Google Cloud Storage URLs.

+ - Enable libcurl-based support for http/https/etc URLs.

+ - Enable support for Amazon AWS S3 URLs.

+ - Move the man5 page files to main package.

+ 

  * Fri Sep 06 2019 Jun Aruga <jaruga@redhat.com> - 1.9-1

  - Update for htslib version 1.9

  

Details

  • Enable separately-compiled plugins.
  • Enable support for Google Cloud Storage URLs.
  • Enable libcurl-based support for http/https/etc URLs.
  • Enable support for Amazon AWS S3 URLs.

I tested following things.

Here is the result of in the mock environment. Following 3 files are added to htslib-devel RPM by this PR.

<mock-chroot> sh-5.0# rpm -ql htslib-devel
...
/usr/libexec/htslib/hfile_gcs.so
/usr/libexec/htslib/hfile_libcurl.so
/usr/libexec/htslib/hfile_s3.so
...

<mock-chroot> sh-5.0# ll /usr/libexec/htslib/*.so
-rwxr-xr-x 1 root root 15880 Oct 21 22:14 /usr/libexec/htslib/hfile_gcs.so
-rwxr-xr-x 1 root root 36896 Oct 21 22:14 /usr/libexec/htslib/hfile_libcurl.so
-rwxr-xr-x 1 root root 24184 Oct 21 22:14 /usr/libexec/htslib/hfile_s3.so

autoheader and autoconf commands are added following below document.
https://github.com/samtools/htslib/blob/1.9/INSTALL#L16-L19

rebased onto c717de6

3 years ago

I rebased, fixing for the review.

Pull-Request has been merged by jaruga

3 years ago