SampleSpecs/cmakeprogram: различия между версиями

Материал из ALT Linux Wiki
м (minor spec cleanup)
м (Откат правок MichaelShigorin (обсуждение) к версии Зануда)
Строка 6: Строка 6:
License: GPLv2+
License: GPLv2+
Group: Development/Other
Group: Development/Other
Url: http://www.altlinux.org/SampleSpecs/cmakeprogram


Url: http://www.altlinux.org/SampleSpecs/cmakeprogram
Packager: Sample Packager <sample@altlinux.org>
Source: %name-%version.tar.bz2
Source: %name-%version.tar.bz2
Packager: Example Packager <example@altlinux.org>


BuildPreReq: cmake rpm-macros-cmake
BuildPreReq: cmake


%description
%description
This specfile is provided as a sample specfile
This specfile is provided as sample specfile for packages with programs.
for a package built with cmake.
It contains most of usual tags and constructions used in such specfiles.


%prep
%prep
Строка 21: Строка 21:


%build
%build
%cmake_insource
mkdir build
%make_build # VERBOSE=1
cd build
cmake ../ \
        -DCMAKE_INSTALL_PREFIX=%_prefix \
%if %_lib == lib64
        -DLIB_SUFFIX=64 \
%endif
        -DCMAKE_CXX_FLAGS:STRING="%optflags" \
        -DCMAKE_BUILD_TYPE="Release" \
        -DCMAKE_SKIP_RPATH=YES
 
%make_build VERBOSE=1


%install
%install
pushd build
%makeinstall_std
%makeinstall_std
popd
%find_lang %name
%find_lang %name


Строка 34: Строка 46:


%changelog
%changelog
* Sat Jan 33 3001 Example Packager <example@altlinux.org> 1.0-alt1
* Sat Jan 33 3001 Sample Packager <sample@altlinux.org> 1.0-alt1
- initial build</pre>
- initial build</pre>


{{Category navigation|title=SampleSpecs|category=SampleSpecs|sortkey={{SUBPAGENAME}}}}
{{Category navigation|title=SampleSpecs|category=SampleSpecs|sortkey={{SUBPAGENAME}}}}

Версия от 20:37, 19 сентября 2017

Name: sampleprog
Version: 1.0
Release: alt1

Summary: Sample program specfile
License: GPLv2+
Group: Development/Other
Url: http://www.altlinux.org/SampleSpecs/cmakeprogram

Packager: Sample Packager <sample@altlinux.org>
Source: %name-%version.tar.bz2

BuildPreReq: cmake

%description
This specfile is provided as sample specfile for packages with programs.
It contains most of usual tags and constructions used in such specfiles.

%prep
%setup

%build
mkdir build
cd build
cmake ../ \
        -DCMAKE_INSTALL_PREFIX=%_prefix \
%if %_lib == lib64
        -DLIB_SUFFIX=64 \
%endif
        -DCMAKE_CXX_FLAGS:STRING="%optflags" \
        -DCMAKE_BUILD_TYPE="Release" \
        -DCMAKE_SKIP_RPATH=YES

%make_build VERBOSE=1

%install
pushd build
%makeinstall_std
popd
%find_lang %name

%files -f %name.lang
%doc AUTHORS ChangeLog NEWS README THANKS TODO contrib/ manual/
%_bindir/*
%_man1dir/*

%changelog
* Sat Jan 33 3001 Sample Packager <sample@altlinux.org> 1.0-alt1
- initial build