diff --git a/libptytty/libptytty.spec b/libptytty/libptytty.spec index 7ddfcfae24..66eed17e47 100644 --- a/libptytty/libptytty.spec +++ b/libptytty/libptytty.spec @@ -31,14 +31,14 @@ Distribution: OpenPKG Community Class: EVAL Group: System License: GPL -Version: 1.8 -Release: 20160306 +Version: 2.0 +Release: 20210828 # list of sources Source0: http://dist.schmorp.de/libptytty/libptytty-%{version}.tar.gz # build information -BuildPreReq: OpenPKG, openpkg >= 20160101, gcc, gcc::with_cxx = yes, make +BuildPreReq: OpenPKG, openpkg >= 20160101, gcc, gcc::with_cxx = yes, make, cmake PreReq: OpenPKG, openpkg >= 20160101 %description @@ -56,20 +56,34 @@ PreReq: OpenPKG, openpkg >= 20160101 %setup -q %build - CC="%{l_cc}" \ - CXX="%{l_cxx}" \ - CFLAGS="%{l_cflags -O}" \ - CXXFLAGS="%{l_cxxflags -O}" \ - CPPFLAGS="%{l_cppflags}" \ - LDFLAGS="%{l_ldflags}" \ - ./configure \ - --prefix=%{l_prefix} \ - --mandir=%{l_prefix}/man \ - --disable-shared - %{l_make} %{l_mflags -O} + mkdir build + cd build + cmake \ + -Wno-dev \ + -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_INSTALL_PREFIX="%{l_prefix}" \ + -DCMAKE_C_COMPILER="%{l_cc}" \ + -DCMAKE_C_FLAGS="%{l_cflags} %{l_cppflags}" \ + -DCMAKE_CXX_COMPILER="%{l_cxx}" \ + -DCMAKE_CXX_FLAGS="%{l_cxxflags} %{l_cppflags}" \ + -DCMAKE_EXE_LINKER_FLAGS="%{l_ldflags}" \ + -DBUILD_SHARED_LIBS=OFF \ + .. + %{l_make} %{l_mflags} %install - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/bin \ + $RPM_BUILD_ROOT%{l_prefix}/lib \ + $RPM_BUILD_ROOT%{l_prefix}/include \ + $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig + %{l_shtool} install -c -s -m 775 \ + build/libptytty.a $RPM_BUILD_ROOT%{l_prefix}/lib/ + %{l_shtool} install -c -m 644 \ + src/libptytty.h \ + $RPM_BUILD_ROOT%{l_prefix}/include/ + %{l_shtool} install -c -m 644 \ + build/libptytty.pc $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} %files -f files