打印

Magic Linux的打包规范

BuildRoot
%clean
这两个部分有一点不同。
个人觉得 clean 的时候把 buildroot 和 builddir 一起删掉比较好,不然很占用空间的......

这个是我的一个典型:jasper
复制内容到剪贴板
代码:
# NOTE: packages that can use jasper:
# ImageMagick
# kdelibs
# netpbm

Name: jasper
Summary: Implementation of the JPEG-2000 standard, Part 1
Summary(zh_CN): JPEG-2000 标准,第 1 部分的实现
Group: System Environment/Libraries
Group(zh_CN): 系统环境/库
Version: 1.900.1
Release: 0.3mgc
License: JasPer License Version 2.0
URL: http://www.ece.uvic.ca/~mdadams/jasper/
Source0: http://www.ece.uvic.ca/~mdadams/jasper/software/%{name}-%{version}.zip
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: automake
BuildRequires: libjpeg-devel
# "freeglut-devel: Requires: libGL-devel libGLU-devel" (#179464)
BuildRequires: freeglut-devel libGL-devel libGLU-devel

%description
This package contains an implementation of the image compression
standard JPEG-2000, Part 1. It consists of tools for conversion to and
from the JP2 and JPC formats.

%description -l zh_CN
本软件包包含了 JPEG-2000 图像压缩标准,第 1 部分的实现。它包含了双向转换 JP2 和 JPC 格式的工具。

%package devel
Summary: JPEG-2000 library developer files
Summary(zh_CN): JPEG-2000 库开发文件
Group: Development/Libraries
Group(zh_CN): 开发/库
Requires: %{name} = %{version}-%{release}
Requires: libjpeg-devel

%description devel
JPEG-2000 library developer files.

%description devel -l zh_CN
JPEG-2000 库开发文件。

%prep
%setup -q -n %{name}-%{version}

%build

%configure \
  --enable-shared \
  --enable-static

%{__make} %{?_smp_mflags}

%install
%{__rm} -rf %{buildroot}
%{__make} DESTDIR=%{buildroot} install

# Unpackaged files
%{__rm} -f doc/README
%{__rm} -f %{buildroot}%{_libdir}/lib*.la

%check
%{__make} check

%clean
%{__rm} -rf %{buildroot} %{_builddir}/%{buildsubdir}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc COPYRIGHT LICENSE NEWS README
%{_bindir}/imgcmp
%{_bindir}/jiv
%{_bindir}/imginfo
%{_bindir}/*jasper*
%{_bindir}/tmrdemo
%{_libdir}/lib*.so.*
%{_mandir}/man1/*

%files devel
%defattr(-,root,root,-)
%doc doc/*
%{_includedir}/jasper/
%{_libdir}/lib*.so
%{_libdir}/*.a

%changelog
* Fri Nov 23 2007 Ni Hui <> - 1.900.1-0.3mgc
- rebuilt
- 恢复 /usr/bin/jiv

* Sat Oct 20 2007 Ni Hui <> - 1.900.1-0.2mgc
- rebuilt
- 丢失文件 jiv (无用)

* Wed Oct 3 2007 Ni Hui <> - 1.900.1-0.1mgc
- first spec file for MagicLinux-2.1
- 去除 GEO jasper 部分以及过时的相关 GL 补丁
[ 本帖最后由 nihui 于 2008-1-28 18:36 编辑 ]

TOP