Skip to content

Commit

Permalink
adjust build parameters for different distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
Gremlin from Kremlin committed Apr 1, 2019
1 parent f0a195d commit 6d3c715
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions huskylib.spec
Expand Up @@ -2,24 +2,44 @@
%define reltype C
# may be one of: C (current), R (release), S (stable)

# release number for Release: header
%define relnum 2

# for generic build; will override for some distributions
%define vendor_prefix %nil
%define vendor_suffix %nil
%define pkg_group Libraries/FTN
%define mnt_mail 2:5020/545

# for CentOS, Fedora and RHEL
%if %_vendor == "redhat"
%define vendor_suffix %dist
%endif

# for ALT Linux
%if %_vendor == "alt"
%define vendor_prefix %_vendor
%define pkg_group Networking/FTN
%define mnt_mail gremlin@altlinux.org
%else
%define pkg_group Libraries/FTN
%define mnt_mail 2:5020/545
%endif

Name: huskylib
Version: 1.9.%{reldate}%{reltype}
Release: %{_vendor}1
Release: %{vendor_prefix}%relnum%{vendor_suffix}
Group: %pkg_group
Summary: Libraries for the Husky Project applications
URL: https://github.com/huskyproject/huskylib
License: GPL
Source: %{name}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%if %_vendor == "alt"
BuildRequires: glibc-devel-static
%endif
#else
%if %_vendor == "redhat"
BuildRequires: glibc-static
%endif

%description
This package contains common libraries for the Husky Project
Expand Down Expand Up @@ -72,7 +92,7 @@ umask 022
make DESTDIR=%buildroot DYNLIBS=1 install
make DESTDIR=%buildroot install
chmod -R a+rX,u+w,go-w %buildroot
# headers for unsupported systems
# do not package headers for unsupported systems
rm -f -- \
%buildroot%_includedir/%name/B*.h \
%buildroot%_includedir/%name/D*.h \
Expand Down Expand Up @@ -106,5 +126,8 @@ rm -rf -- %buildroot
%_libdir/*.a

%changelog
* Mon Apr 01 2019 Gremlin from Kremlin <%{mnt_mail}> 1.9.20190311C-%{_vendor}2
- adjust build parameters for different distributions

* Mon Mar 11 2019 Gremlin from Kremlin <%{mnt_mail}> 1.9.20190311C-%{_vendor}1
- rewrite .spec from scratch, split to subpackages

0 comments on commit 6d3c715

Please sign in to comment.