179 lines
5.1 KiB
RPMSpec
179 lines
5.1 KiB
RPMSpec
Name: uuid
|
|
Version: 1.6.2
|
|
Release: 42
|
|
Summary: Universally Unique Identifier library
|
|
License: MIT
|
|
URL: http://www.ossp.org/pkg/lib/uuid/
|
|
Source0: ftp://ftp.ossp.org/pkg/lib/uuid/uuid-%{version}.tar.gz
|
|
Patch0001: uuid-1.6.1-ossp.patch
|
|
Patch0002: uuid-1.6.1-mkdir.patch
|
|
Patch0003: uuid-1.6.2-php54.patch
|
|
Patch0004: uuid-1.6.2-hwaddr.patch
|
|
Patch0005: uuid-1.6.2-nostrip.patch
|
|
Patch0006: uuid-1.6.2-manfix.patch
|
|
Patch0007: uuid-aarch64.patch
|
|
BuildRequires: libtool
|
|
Obsoletes: %{name}-pgsql < 1.6.2-24
|
|
|
|
%description
|
|
OSSP uuid is a ISO-C:1999 application programming interface (API) and corresponding
|
|
command line interface (CLI) for the generation of DCE 1.1, ISO/IEC 11578:1996 and
|
|
RFC 4122 compliant Universally Unique Identifier (UUID).
|
|
It supports DCE 1.1 variant UUIDs of version 1 (time and node based), version 3
|
|
(name based, MD5), version 4 (random number based) and version 5 (name based, SHA-1).
|
|
Additional API bindings are provided for the languages ISO-C++:1998 and Perl:5 Optional
|
|
backward compatibility exists for the ISO-C DCE-1.1 and Perl Data::UUiID APIs.
|
|
UUIDs are 128-bit numbers which are intended to have a high likelihood of uniqueness
|
|
over space,they can be locally generated without contacting a global registration authority.
|
|
|
|
%package devel
|
|
Summary: Development files for UUID library
|
|
Requires: pkgconfig %{name} = %{version}-%{release}
|
|
|
|
%description devel
|
|
This package provides libraries and header files for UUID library.
|
|
|
|
%package c++
|
|
Summary: C++ support for UUID library
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description c++
|
|
This package includes C++ libraries for UUID.
|
|
|
|
%package c++-devel
|
|
Summary: C++ development files for UUID library
|
|
Requires: %{name}-c++ = %{version}-%{release} %{name}-devel = %{version}-%{release}
|
|
|
|
%description c++-devel
|
|
This package provides c++ development files for UUID library.
|
|
|
|
%package perl
|
|
Summary: Perl support for UUID library
|
|
BuildRequires: perl-devel perl-generators perl(Data::UUID) perl(ExtUtils::MakeMaker) perl(Test::More)
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
|
Requires: %{name} = %{version}-%{release} perl(Data::UUID)
|
|
|
|
%description perl
|
|
This package includes perl UUID module.
|
|
|
|
%package dce
|
|
Summary: DCE support for UUID library
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description dce
|
|
This package includes DCE UUID module.
|
|
|
|
%package dce-devel
|
|
Summary: DCE development support for UUID library
|
|
Requires: %{name}-dce = %{version}-%{release} %{name}-devel = %{version}-%{release}
|
|
|
|
%description dce-devel
|
|
This package provides DCE development files for UUID library.
|
|
|
|
%package help
|
|
Summary: Help documentation for UUID
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description help
|
|
Man pages and other related help documents for UUID library.
|
|
|
|
%prep
|
|
%autosetup -n %{name}-%{version} -p1
|
|
|
|
%build
|
|
export LIB_NAME=libossp-uuid.la DCE_NAME=libossp-uuid_dce.la CXX_NAME=libossp-uuid++.la
|
|
export PHP_NAME=$(pwd)/php/modules/ossp-uuid.so PGSQL_NAME=$(pwd)/pgsql/libossp-uuid.so
|
|
export CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
|
|
%configure --disable-static --without-perl --without-php \
|
|
--with-dce --with-cxx --without-pgsql
|
|
|
|
%make_build LIBTOOL=/usr/bin/libtool CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS"
|
|
|
|
pushd perl
|
|
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" COMPAT=0
|
|
%{__perl} -pi -e 's/^\tLD_RUN_PATH=[^\s]+\s*/\t/' Makefile
|
|
%make_build
|
|
popd
|
|
|
|
%install
|
|
%make_install
|
|
|
|
%delete_la_and_a
|
|
chmod 755 $RPM_BUILD_ROOT%{_libdir}/*.so.*.*.*
|
|
|
|
pushd perl
|
|
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
|
|
|
|
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 | xargs rm -f
|
|
find $RPM_BUILD_ROOT -type f -name .packlist | xargs rm -f
|
|
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
|
|
|
|
%{_fixperms} $RPM_BUILD_ROOT/*
|
|
popd
|
|
|
|
%check
|
|
make check
|
|
|
|
pushd perl
|
|
LD_LIBRARY_PATH=../.libs make test
|
|
perl -MData::UUID -e 'print "Testing compatibility of Data::UUID version $Data::UUID::VERSION\n";'
|
|
LD_LIBRARY_PATH=../.libs make test TEST_FILES=uuid_compat.ts
|
|
popd
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%post c++ -p /sbin/ldconfig
|
|
|
|
%post dce -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%postun c++ -p /sbin/ldconfig
|
|
|
|
%postun dce -p /sbin/ldconfig
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc AUTHORS README
|
|
%{_bindir}/uuid
|
|
%{_libdir}/libossp-uuid.so.*
|
|
%exclude %{_mandir}/man1/uuid-config.*
|
|
|
|
%files devel
|
|
%defattr(-,root,root,-)
|
|
%{_bindir}/uuid-config
|
|
%{_includedir}/uuid.h
|
|
%{_libdir}/{libossp-uuid.so,pkgconfig/ossp-uuid.pc}
|
|
|
|
%files c++
|
|
%defattr(-,root,root,-)
|
|
%{_libdir}/libossp-uuid++.so.*
|
|
|
|
%files c++-devel
|
|
%defattr(-,root,root,-)
|
|
%{_includedir}/uuid++.hh
|
|
%{_libdir}/libossp-uuid++.so
|
|
|
|
%files perl
|
|
%defattr(-,root,root,-)
|
|
%{perl_vendorarch}/{auto/*,OSSP*}
|
|
|
|
%files dce
|
|
%defattr(-,root,root,-)
|
|
%{_libdir}/libossp-uuid_dce.so.*
|
|
|
|
%files dce-devel
|
|
%defattr(-,root,root,-)
|
|
%{_includedir}/uuid_dce.h
|
|
%{_libdir}/libossp-uuid_dce.so
|
|
|
|
%files help
|
|
%defattr(-,root,root,-)
|
|
%doc ChangeLog HISTORY NEWS PORTING SEEALSO THANKS TODO USERS
|
|
%{_mandir}/man1/*
|
|
%{_mandir}/man3/*
|
|
|
|
%changelog
|
|
* Tue Nov 19 2019 yanzhihua <yanzhihua4@huawei.com> - 1.6.2-42
|
|
- Package init
|