source: projects/vine-spec-skeleton/tags/release-0.3/lib/VineLinux/VSS/Skeleton/SelfBuild/SelfBuildSpec.pm @ 639

Revision 639, 4.9 KB checked in by munepi, 14 years ago (diff)

added self-build skeleton

Line 
1package VineLinux::VSS::Skeleton::SelfBuild::SelfBuildSpec;
2
31;
4__DATA__
5%define pkgname <TMPL_VAR NAME="package_name">
6%define name    self-build-%{pkgname}
7%define version 1.0
8%define release 1%{?_dist_release}
9
10%define sourceurl0      http://example.com/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.bz2
11
12Summary:        Package to automatically build %{pkgname} rpm package
13Summary(ja):    %{pkgname}  rpm パッケージを自動作成するパッケージ
14Name:           %{name}
15Version:        %{version}
16Release:        %{release}
17Source0:        %{pkgname}-vl.spec
18
19#Source10:      %{pkgname}-%{version}.tar.bz2
20
21#Source100:     hoge-foo.patch
22
23License:     
24Group:          Restricted Software
25
26##!! Requires(posttrans) not yet implemented. So we use (post) instead.
27Requires(post):         self-build-setup >= 0.9.9
28
29# (build)requies of target package.
30Requires(post):         
31Requires(post):         
32Requires(post):         
33Requires:       
34# %if %{?_dist_release} == "vl5" || %{?_dist_release} == "vl6"
35# Requires:     
36# Requires(post):               
37# %endif
38# %if %{?_dist_release} == "vl4"
39# Requires:     
40# Requires(post):               
41# %endif
42
43BuildArch:    noarch
44BuildRoot:    %{_tmppath}/%{name}-%{version}-root
45
46Distribution: Vine Linux
47Vendor:       Project Vine
48Packager:     <TMPL_VAR NAME="packager_name">
49
50%description
51<TMPL_VAR NAME="package_name">
52
53If you install this package, it automaticaly downloads source
54code, compile it, and create rpm packages of %{pkgname}-%{version}.
55And the created rpm packages are automatically installed
56if installation is executed by apt-get command or synaptic
57package manager.
58
59[Note]
60This package requires many other packages to compile
61targetsoftware. So it consume more disk space than usual.
62Also installation takes logner time because of compilation.
63(This will take a few minutes to quarter or half of an hour,
64depends on building environment)
65
66[About self-build package]
67For some kind of software, distributing of binary package
68may viorate the patent or law. Therefore we chose self-build
69packge, create binary package on your machine, for such kind
70of softwares instead of distributing binary package.
71
72Please obey the national law when you use the created binary
73packages. And if you want to use the softwares using patented
74thechnology, it may be required to get a permission, make an
75agreement or purchas a license. Please consider it with your
76purpose or way of use and take appropriate action.
77
78%description -l ja
79<TMPL_VAR NAME="package_name">
80
81このパッケージをインストールすると、自動的にソースコードを
82ダウンロードしてコンパイルし、%{pkgname}-%{version}
83 rpm パッケージを作成します。
84また apt-get コマンドや synaptic パッケージマネージャから実行
85した場合は、作成された rpm パッケージのインストールも自動的に
86行います。
87
88[注意]
89コンパイルに必要な多くの関連パッケージを要求するので通常より
90ディスクの領域を多く消費します。
91またインストール時にコンパイルを行うため、通常より時間がかか
92る場合があります。(環境にもよりますが数分から数十分程度)
93
94[self-build パッケージについて]
95ソフトウェアによってはバイナリパッケージの配布が特許や法律に
96違反する可能性があるものがあります。その為、このような問題が
97懸念されるソフトウェアについてはバイナリパッケージを直接配布
98せずに、ユーザの環境でバイナリを作成する self-build パッケー
99ジという方法を採っています。
100
101作成されたバイナリパッケージの利用にあたっては、各ソフトウェ
102アのライセンス、および利用する国の各種法令に従ってください。
103また特許に関連するソフトウェアの場合、利用許諾や契約、ライ
104センスの購入などが必要となる場合がありますので、利用する目的
105や形態に応じて各自で判断し適切な対応を取ってください。
106
107
108%prep
109[ "%{version}-%{release}" != $(rpm -q --queryformat "%%{version}-%%{release}\n" --specfile %{SOURCE0} | tail -1) ] && exit 1
110
111%setup -q -n %{origname}-%{origver}
112
113%install
114%{__rm} -rf ${RPM_BUILD_ROOT}
115%{__install} -d ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
116%{__install} -m 644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
117#%{__install} -m 644 %{SOURCE10} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
118#%{__install} -m 644 %{SOURCE100} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
119
120%clean
121%{__rm} -rf ${RPM_BUILD_ROOT}
122
123%posttrans
124/usr/lib/rpm/self-build-rpm.sh %{name} %{pkgname}-vl.spec "%{sourceurl0}" buildlogsize
125#/usr/lib/rpm/self-build-rpm.sh %{name} %{pkgname}-vl.spec buildlogsize
126
127# /usr/lib/rpm/pre-allocate-rpm.sh %{pkgname}-%{version}-%{release} \
128#                                  %{pkgname}-devel-%{version}-%{release}
129
130%files
131%defattr(-,root,root)
132%{_datadir}/%{name}
133
134%changelog
135* <TMPL_VAR NAME="generate_date"> <TMPL_VAR NAME="packager_fullname"> <<TMPL_VAR NAME="packager_email">>
136- first release for Vine Linux
Note: See TracBrowser for help on using the repository browser.