source: projects/specs/tags/6_0_REL/l/less/less-vl.spec @ 3012

Revision 3012, 7.2 KB checked in by daisuke, 13 years ago (diff)

split Requires(post,preun)

Line 
1Summary: A text file browser similar to more, but better
2Summary(ja): more よりも高機能な日本語対応ページャ
3Name: less
4Version: 436
5Release: 3%{?_dist_release}
6
7Group: Applications/Text
8License: GPLv3+
9URL: http://www.greenwoodsoftware.com/less/
10
11Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
12Source1: lesspipe.sh
13Source2: less.sh
14Source3: less.csh
15#Source3: less-354-hlp-ja.tgz
16Patch1: less-406-Foption.patch
17Patch4: less-394-time.patch
18Patch5: less-418-fsync.patch
19Patch6: less-436-manpage.patch
20
21Buildroot: %{_tmppath}/%{name}-%{version}-root
22BuildRequires: ncurses-devel
23BuildRequires: pcre-devel
24BuildRequires: autoconf automake libtool
25Requires(post): alternatives
26Requires(preun): alternatives
27Requires: gzip, bzip2
28Requires: file >= 3.33
29Provides: pager
30
31Vendor: Project Vine
32Distribution: Vine Linux
33
34%description
35The less utility is a text file browser that resembles more, but has
36more capabilities.  Less allows you to move backwards in the file as
37well as forwards.  Since less doesn't have to read the entire input file
38before it starts, less starts up more quickly than text editors (for
39example, vi).
40
41You should install less because it is a basic utility for viewing text
42files, and you'll use it frequently.
43
44%description -l ja
45less は more よりも高機能な日本語対応ページャです.less は起動時にテキスト
46ファイルを完全に読み込む必要がないので,vi などの テキストエディタに比べて
47高速に起動することができます.
48
49環境変数 LESSOPEN を "|lesspipe.sh %s" に設定することによって, gzip や
50compress で圧縮されたファイルを自動的に展開して表示することもできます.
51
52less はテキストファイルを表示するためによく使用する基本的なツールなので,
53インストールしておくべきでしょう.
54
55%prep
56%setup -q
57%patch1 -p1 -b .Foption
58%patch4 -p1 -b .time
59%patch5 -p1 -b .fsync
60%patch6 -p1 -b .manpage
61
62autoreconf
63
64chmod -R a+w *
65chmod 644 lessecho.c lesskey.c version.c LICENSE
66
67
68%build
69%configure --with-regex=pcre
70make CC="gcc $RPM_OPT_FLAGS -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 `pcre-config --cflags`" datadir=%{_docdir}
71
72
73%install
74rm -rf $RPM_BUILD_ROOT
75%makeinstall
76strip -R .comment $RPM_BUILD_ROOT/%{_bindir}/less
77mkdir -p $RPM_BUILD_ROOT/etc/profile.d
78install -p -c -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir}
79install -p -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d
80install -p -c -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d
81ls -la $RPM_BUILD_ROOT/etc/profile.d
82
83%clean
84rm -rf $RPM_BUILD_ROOT
85
86%post
87/sbin/update-alternatives --install %{_bindir}/pager pager %{_bindir}/less 50
88
89# fix broken symlink if it's there
90if [ ! -f %{_bindir}/pager ] ; then
91    /sbin/update-alternatives --auto pager
92fi
93
94%preun
95if [ $1 -eq 0 ]; then
96    /sbin/update-alternatives --remove pager %{_bindir}/less
97    /sbin/update-alternatives --auto pager
98fi
99
100%files
101%defattr(-,root,root)
102%doc COPYING LICENSE NEWS README
103%config %{_sysconfdir}/profile.d/*
104%{_bindir}/less
105%{_bindir}/lesskey
106%{_bindir}/lessecho
107%{_bindir}/lesspipe.sh
108%{_mandir}/man1/less.1*
109%{_mandir}/man1/lesskey.1*
110%{_mandir}/man1/lessecho.1*
111
112%changelog
113* Sat Mar 19 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 436-3
114- split Requires(post,preun)
115
116* Sun Sep 19 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 436-2
117- updated japanese summary and description
118
119* Thu Jul 29 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 436-1
120- updated to 436
121
122* Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 382-1vl5
123- applied new versioning policy, spec in utf-8
124
125* Fri Apr 13 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 382-0vl6
126- add Provides: pager
127- add Requires(post,preun): alternatives
128
129* Mon Apr 09 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 382-0vl5
130- add update-alternatives: pager in %%post, %%preun scriptlet
131
132* Thu Nov 09 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 382-0vl4
133- revert to 382-iso259 ([VineSeed:12552])
134
135* Wed Nov 08 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 382-0vl3
136- update jless patch to 382-iso262
137- update description (iso254 to iso262)
138
139* Sun Nov 05 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 382-0vl2
140- change log was missing in 382-0vl1
141
142* Sun Nov 05 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 382-0vl1
143- new upstream release
144- update jless patch to 382-iso258
145
146* Tue Dec 14 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 358-0vl10
147- set _FILE_OFFSET_BITS 64
148
149* Sat May 17 2003 KAZUKI SHIMURA <rito@pos.to> 358-0vl9
150- rebuild with new toolchain
151- fix description (iso242 to iso254)
152
153* Thu Apr 25 2002 Kosaku Nagasaka <nagasaka@math.tsukuba.ac.jp>
154- 358-0vl8: temporary fix: consistency of the nls-patch and (J)LESSCHARSET
155
156* Sun Mar 31 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
157- 358-0vl7: fix lesspipe.sh for file names with spaces
158
159* Wed Aug 22 2001 Toru Sagami <sagami@vinelinux.org>
160- 358-0vl6: rebuild on ncurses-5.2 (as asked to do so)
161
162* Sun Aug 19 2001 Toru Sagami <sagami@vinelinux.org>
163- 358-0vl5: added more documents (COPYING, LICENSE)
164- fix lesspipe.sh again and tweak lesspipe.csh a bit with %%config marked
165
166* Wed Jun 27 2001 Jun Nishii <jun@vinelinux.org> 358-0vl4
167- fix lesspipe.sh
168- do not REset LESSOPEN in profile.d/less.sh
169
170* Sat Jan 13 2001 Lisa Sagami <czs14350@mb.infoweb.ne.jp>
171- 358-0vl3
172- fixed lesspipe.sh
173
174* Fri Jan 12 2001 Lisa Sagami <czs14350@mb.infoweb.ne.jp>
175- 358-0vl2
176- added bzip2/lha support to lesspipe.sh
177- minor spec fixes
178
179* Thu Jan 11 2001 Jun Nishii <jun@vinelinux.org>
180- 358-0vl1
181- more fix of lesspipe.sh
182- requires file >= 3.33
183- more macros in spec
184
185* Thu Jan 11 2001 Jun Nishii <jun@vinelinux.org>
186- 354-0vl5
187- modify lesspipe.sh to adapt to file-3.33 and to view gzipped nroff file
188
189* Tue Dec 26 2000 Tomoya TAKA <tomoya@olive.plala.or.jp> 354-0vl3
190- some fixes to handle man pages correctly
191
192* Sun Nov 12 2000 MACHINO, Satoshi <machino@vinelinux.org> 354-0vl2
193- build on gcc-2.95.3
194- partially used rpmmacros
195
196* Wed Jul  5 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
197- added Sagam's patch to fix parse ctrl code for Japanese. Very thanks Sagami-san.
198
199* Wed Jun 21 2000 Jun Nishii <jun@vinelinux.org>
200- less-354-0vl1
201
202* Mon Jan 17 2000 Yasuyuki Furukawa  <furukawa@vinelinux.org>
203- updated ja_nls patch for memory leaks.
204
205* Mon Jan 10 2000 Jun Nishii <jun@vinelinux.org>
206- rel.7 (5vl2 makes harm for update from Vine-1.1)
207
208* Fri Jan  7 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
209- rel 5vl2
210- added ja_nls and bzip2 patches
211- added Requires for bzip2 and gzip.
212
213* Fri Jan  7 2000 Jun Nishii <jun@vinelinux.org>
214- rel.6
215- change group
216
217* Sun Sep 6 1999 Jun NISHII <jun@flatout.org>
218- rel.5
219- remove LESS=-r to avoid somed troubles
220
221* Sat Aug 21 1999 Jun NISHII <jun@flatout.org>
222- rel.4
223- change groff path in lesspipe.sh to adapt groff-1.11
224- added /etc/profile.d/less{.,.csh}
225
226* Thu Jun 24 1999 Norihito Ohmori <ohmori@flatout.org>
227- rebuild for glibc-2.1
228
229* Mon Feb 15 1999 Jun NISHII <jun@flatout.org>
230- rel.2
231- added preprocess for bzip2ed file
232- added Japanese summary
233
234* Wed Dec 2 1998 Jun NISHII <jun@flatout.org>
235- rename from less-332iso242-4 to less-332_jp-1
236- strip bins
237
238* Tue Oct 8 1998 Jun NISHII <jun@flatout.org>
239- release 4
240- modify header of spec file
241
242* Sat Sep 26 1998 Jun NISHII <jun@flatout.org>
243- release 3
244- added lesspipe.sh
Note: See TracBrowser for help on using the repository browser.