【问题标题】:Create FreeXL rpm for CentOS 7: spec file?为 CentOS 7 创建 FreeXL rpm:规范文件?
【发布时间】:2017-12-29 23:54:39
【问题描述】:

我正在尝试构建一个规范文件来为 FreeXL con CentOS 7 创建 rpm。

如果我尝试手动执行这些步骤

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

export MAKEFLAGS='-j2'

./configure --prefix=/usr/local && make && make install

一切正常,我可以在 /usr/local/..... 下看到有关 FreeXL 的文件。

我已尝试在规范文件中“翻译”这些步骤...给你

#
# 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

我获得了我的 freexl-debuginfo-1.0.2-1.csi.x86_64.rpm 文件,但是当我尝试安装它时没有安装任何东西(并且在安装过程中没有显示任何错误......

我认为我的规范文件中可能存在一些错误......有任何建议/示例吗?

【问题讨论】:

    标签: build compilation installation rpm make-install


    【解决方案1】:

    我已经解决了:问题是我的规范文件不完整....

    这是一个正确的规范文件,可以正常工作....

    https://build.opensuse.org/package/view_file/openSUSE:Factory/freexl/freexl.spec?expand=1

    它也适用于 CentOS 7!

    【讨论】:

      猜你喜欢
      • 2018-06-16
      • 2011-06-16
      • 2019-07-01
      • 1970-01-01
      • 2012-10-16
      • 1970-01-01
      • 2017-08-04
      • 2016-05-26
      • 1970-01-01
      相关资源
      最近更新 更多