Create FreeXL rpm for CentOS 7: spec file?

General support questions
Post Reply
cesare
Posts: 1
Joined: 2017/07/24 16:11:56

Create FreeXL rpm for CentOS 7: spec file?

Post by cesare » 2017/07/24 16:14:15

I'm trying to build a spec file to create rpm for FreeXL con CentOS 7.

If I try to execute these steps manually

Code: Select all

    tar xzf freexl-1.0.2.tar.gz
    cd freexl-1.0.2

    export MAKEFLAGS='-j2'

    ./configure --prefix=/usr/local && make && make install
all works fine I can see under /usr/local/..... the files aboout FreeXL.

I've tried to "translate" these steps in a spec file ... here you are it

Code: Select all

  #
    # spec file for package freexl
    #
    # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
    #
    # All modifications and additions to the file contributed by third parties
    # remain the property of their copyright owners, unless otherwise agreed
    # upon. The license for this file, and modifications and additions to the
    # file, is the same license as for the pristine package itself (unless the
    # license for the pristine package is not an Open Source License, in which
    # case the license is the MIT License). An "Open Source License" is a
    # license that conforms to the Open Source Definition (Version 1.9)
    # published by the Open Source Initiative.
        
    %define libname lib%{name}1
    Name:           freexl
    Version:        1.0.2
    Release:        1.my
    Summary:        Library to extract valid data from within an Excel
    License:        MPL-1.1 or GPL-2.0+ or LGPL-2.1+
    Group:          Development/Libraries/C and C++
    Url:            https://www.gaia-gis.it/fossil/freexl/index
    Source:         http://www.gaia-gis.it/gaia-sins/%{name}-%{version}.tar.gz
    BuildRequires:  gcc-c++
    BuildRoot:      %{_tmppath}/%{name}-%{version}-build
    
    %description
    FreeXL is an open source library to extract valid data from within an Excel (.xls) spreadsheet.
    
    %package -n %{libname}
    Summary:        Shared library for FreeXL
    Group:          System/Libraries
    
    %description -n %{libname}
    FreeXL is an open source library to extract valid data from within an Excel (.xls) spreadsheet.
    
    %package devel
    Summary:        Development files for %{name}
    Group:          Development/Libraries/C and C++
    Requires:       %{libname} = %{version}
    Requires:       glibc-devel
    
    %description devel
    This package contains all necessary include files and libraries needed
    to compile and develop applications that use libspatialite.
    
    #redefine path ...
    %define _bindir	/usr/local
    
    %prep
    %setup -q
    
    %build
    
    %configure
    
    %install
    ./configure --prefix=%_bindir && make && make install
    
    %changelog
I obtain my freexl-debuginfo-1.0.2-1.csi.x86_64.rpm file but when I try to install it nothing is installed (and no errors are shown during installation ....

I think that probably there are some errors in my spec file ...... any suggestions / examples?

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Create FreeXL rpm for CentOS 7: spec file?

Post by TrevorH » 2017/07/24 16:18:30

There are freexl packages in the EPEL repository already.

yum --enablerepo=extras install epel-release && yum install freexl
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply