]> git.pld-linux.org Git - packages/tcsh.git/blame - tcsh.spec
Fix build with -Werror=format-security
[packages/tcsh.git] / tcsh.spec
CommitLineData
df4910bf 1#
0f8067ae 2# Conditional build:
9bef067a 3%bcond_with working_history # compiles tcsh with timestamps in
72d1d050
PG
4 # ~/.history file so it serves any real purpose (which
5 # is not the case for default PLD tcsh)
18e22217 6%bcond_with static # don't build static version
0f8067ae 7#
366b6df6 8Summary: Enhanced c-shell
44776055
ER
9Summary(de.UTF-8): Erweiterte C-Shell
10Summary(es.UTF-8): C-shell mejorada
11Summary(fr.UTF-8): Shell C amélioré
12Summary(ko.UTF-8): csh의 향상된 버전
13Summary(pl.UTF-8): Zaawansowany C-shell
14Summary(pt_BR.UTF-8): C-shell melhorada
15Summary(ru.UTF-8): Улучшеная версия csh
16Summary(tr.UTF-8): Gelişmiş c-kabuğu (c-shell)
17Summary(uk.UTF-8): Покращена верся csh
366b6df6 18Name: tcsh
18e22217 19Version: 6.18.01
12f8b424 20Release: 4
0bea26fe 21License: distributable
6a3eb4fb 22Group: Applications/Shells
c486a896 23Source0: ftp://ftp.astron.com/pub/tcsh/%{name}-%{version}.tar.gz
18e22217 24# Source0-md5: 6eed09dbd4223ab5b6955378450d228a
366b6df6 25Source1: csh.cshrc
71c6987d 26Source2: csh.login
27Source3: %{name}-skel-.login
cd37c0fb
JR
28Patch0: %{name}-misc.patch
29Patch1: %{name}-termios.patch
30Patch2: %{name}-no-timestamp-history.patch
31Patch3: %{name}-time.patch
32Patch4: %{name}-rlimit_locks.patch
33Patch5: %{name}-no_TERMCAP.patch
df91bec4 34Patch6: %{name}-format-security.patch
9ac38fcf 35URL: http://www.tcsh.org/Home
9bb0f4d1 36BuildRequires: autoconf >= 2.59
ad17217d 37BuildRequires: automake
37250147 38BuildRequires: groff
654ca8ad
JB
39# for gencat
40BuildRequires: iconv
0f8067ae 41BuildRequires: ncurses-devel >= 5.0
411bfd85 42%if %{with static}
5865fac9 43BuildRequires: glibc-static
0f8067ae 44BuildRequires: ncurses-static
411bfd85 45%endif
0f8067ae
JB
46Requires(post,preun): grep
47Requires(preun): fileutils
48Provides: csh
17f34f29 49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
945c0ef7 50
7957f4c8 51%define _bindir /bin
52
945c0ef7 53%description
51a10b24 54'tcsh' is an enhanced version of csh (the C shell), with additional
55features such as command history, filename completion, and fancier
56prompts.
945c0ef7 57
db8b7afb 58%description -l de.UTF-8
51a10b24 59'tcsh' ist eine erweiterte Version von csh (der C-Shell) mit
db8b7afb
JR
60zusätzlichen Funktionen wie Befehlsgeschichte,
61Dateinamenvervollständigung und attraktiveren Prompts.
945c0ef7 62
db8b7afb
JR
63%description -l es.UTF-8
64"tcsh" es una versión mejorada de la csh (C shell), con
65características adicionales como historia de los comandos, complemento
95b50800 66de nombre de archivo y prompts.
67
db8b7afb
JR
68%description -l fr.UTF-8
69'tcsh' est une version améliorée de csh (le shell C), avec des
70fonctionnalités supplémentaires comme un historique des commandes, la
71complétion des noms de fichiers, et des prompts sympas.
945c0ef7 72
db8b7afb
JR
73%description -l pl.UTF-8
74Tcsh jest zaawansowaną wersją powłoki csh (C-shell), z różnorodnymi
1133eb89 75udogodnieniami takimi jak historia komend itp.
76
db8b7afb
JR
77%description -l pt_BR.UTF-8
78"tcsh" é uma versão melhorada da csh (C shell), com características
95b50800 79adicionais como history dos comandos, complemento de nome de arquivo e
80prompts.
81
db8b7afb
JR
82%description -l ru.UTF-8
83Это улучшенная версия csh (the C shell) с дополнительными
84возможностями, такими как история комманд, дополнение имен файлов и
85т.д.
95b50800 86
db8b7afb
JR
87%description -l tr.UTF-8
88tcsh, csh'in (C kabuğu) gelişkin bir sürümüdür ve komut tarihçesi,
89dosya adı tamamlama ve şık komut imleri gibi özellikler sunar.
95b50800 90
db8b7afb
JR
91%description -l uk.UTF-8
92Це покращена версія csh (the C shell) з додатковими можливостями,
93такими як історія команд, завершення імен файлів і т.і.
945c0ef7 94
63346b4a 95%package static
5257cfc7 96Summary: Statically linked Enhanced c-shell
44776055 97Summary(pl.UTF-8): Skonsolidowana statycznie zaawansowana powłoka C
6a3eb4fb 98Group: Applications/Shells
0f8067ae
JB
99Requires(post,preun): grep
100Requires(preun): fileutils
5865fac9 101Requires: %{name} = %{version}-%{release}
63346b4a
JR
102
103%description static
51a10b24 104'tcsh' is an enhanced version of csh (the C shell), with additional
105features such as command history, filename completion, and fancier
106prompts.
63346b4a 107
b583e8db 108This packege contains statically linked version of tcsh.
63346b4a 109
db8b7afb
JR
110%description static -l pl.UTF-8
111Tcsh jest zaawansowaną wersją powłoki csh (C-shell), z różnorodnymi
63346b4a
JR
112udogodnieniami takimi jak historia komend itp.
113
33f2344a 114W tym pakiecie jest statycznie skonsolidowany tcsh.
63346b4a 115
945c0ef7 116%prep
f01f4c8f 117%setup -q
cd37c0fb
JR
118%patch0 -p1
119%patch1 -p1
120%{!?with_working_history:%patch2 -p1}
121%patch3 -p1
122%patch4 -p1
123%patch5 -p1
df91bec4 124%patch6 -p1
945c0ef7 125
126%build
df91bec4 127mkdir m4
e3afa17b 128cp /usr/share/automake/config.sub .
ad17217d 129%{__aclocal}
a7e280ec 130%{__autoconf}
674d7ca0 131%configure
411bfd85 132%if %{with static}
5865fac9
JB
133%{__make} \
134 LDFLAGS="-static %{rpmldflags}" \
e436a48a 135 LIBES="-lncurses -lcrypt"
73ed54b0 136mv -f tcsh tcsh.static
411bfd85 137%endif
5865fac9
JB
138%{__make} \
139 LDFLAGS="%{rpmldflags}" \
e436a48a 140 LIBES="-lncurses -lcrypt"
8843be5d 141
6f178a16 142%{__make} -C nls
945c0ef7 143
144%install
145rm -rf $RPM_BUILD_ROOT
18e22217
JR
146install -d $RPM_BUILD_ROOT/etc/skel
147
148%{__make} install \
149 DESTDIR=$RPM_BUILD_ROOT
945c0ef7 150
12f8b424 151# fix lang code
952034f5 152%{__mv} $RPM_BUILD_ROOT%{_datadir}/locale/{gr,el}
12f8b424
JB
153# it's Ukrainian in UTF-8, not Russian in KOI8-U
154%{__mv} $RPM_BUILD_ROOT%{_datadir}/locale/{ru_UA.koi8u,uk}
952034f5 155
411bfd85
MP
156%if %{with static}
157install tcsh.static $RPM_BUILD_ROOT%{_bindir}
158%endif
1deb40f6
JR
159
160nroff -me eight-bit.me > eight-bit.txt
945c0ef7 161
784da6ca 162echo .so tcsh.1 > $RPM_BUILD_ROOT%{_mandir}/man1/csh.1
945c0ef7 163
a3a19f15 164ln -sf tcsh $RPM_BUILD_ROOT%{_bindir}/csh
945c0ef7 165
71c6987d 166install %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
167install %{SOURCE3} $RPM_BUILD_ROOT/etc/skel/.login
945c0ef7 168
09fea393
JB
169%clean
170rm -rf $RPM_BUILD_ROOT
171
945c0ef7 172%post
0f8067ae 173umask 022
945c0ef7 174if [ ! -f /etc/shells ]; then
a3a19f15 175 echo "%{_bindir}/tcsh" > /etc/shells
176 echo "%{_bindir}/csh" >> /etc/shells
945c0ef7 177else
62f9ba61
JB
178 grep -q '^%{_bindir}/tcsh$' /etc/shells || echo "%{_bindir}/tcsh" >> /etc/shells
179 grep -q '^%{_bindir}/csh$' /etc/shells || echo "%{_bindir}/csh" >> /etc/shells
945c0ef7 180fi
181
f01f4c8f
JB
182%preun
183umask 022
184if [ "$1" = "0" ]; then
185 grep -v '^%{_bindir}/t\?csh$' /etc/shells > /etc/shells.new
186 mv -f /etc/shells.new /etc/shells
187fi
188
63346b4a 189%post static
0f8067ae 190umask 022
63346b4a 191if [ ! -f /etc/shells ]; then
a3a19f15 192 echo "%{_bindir}/tcsh.static" > /etc/shells
63346b4a 193else
62f9ba61 194 grep -q '^%{_bindir}/tcsh\.static$' /etc/shells || echo "%{_bindir}/tcsh.static" >> /etc/shells
63346b4a 195fi
945c0ef7 196
62f9ba61 197%preun static
0f8067ae 198umask 022
62f9ba61
JB
199if [ "$1" = "0" ]; then
200 grep -v '^%{_bindir}/tcsh\.static$' /etc/shells > /etc/shells.new
201 mv -f /etc/shells.new /etc/shells
63346b4a
JR
202fi
203
945c0ef7 204%files
70bd5214 205%defattr(644,root,root,755)
24a6af52 206%doc NewThings FAQ eight-bit.txt complete.tcsh
366b6df6 207
15fd3d93
ER
208%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/csh.*
209%config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.login
1133eb89 210
a3a19f15 211%attr(755,root,root) %{_bindir}/csh
212%attr(755,root,root) %{_bindir}/tcsh
952034f5 213#%{_datadir}/locale/C/LC_MESSAGES/tcsh.cat
18e22217 214%lang(de) %{_datadir}/locale/de/LC_MESSAGES/tcsh.cat
952034f5 215%lang(el) %{_datadir}/locale/el/LC_MESSAGES/tcsh.cat
18e22217
JR
216%lang(es) %{_datadir}/locale/es/LC_MESSAGES/tcsh.cat
217%lang(et) %{_datadir}/locale/et/LC_MESSAGES/tcsh.cat
218%lang(fi) %{_datadir}/locale/fi/LC_MESSAGES/tcsh.cat
219%lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/tcsh.cat
18e22217
JR
220%lang(it) %{_datadir}/locale/it/LC_MESSAGES/tcsh.cat
221%lang(ja) %{_datadir}/locale/ja/LC_MESSAGES/tcsh.cat
222%lang(pl) %{_datadir}/locale/pl/LC_MESSAGES/tcsh.cat
223%lang(ru) %{_datadir}/locale/ru/LC_MESSAGES/tcsh.cat
12f8b424
JB
224%lang(uk) %{_datadir}/locale/uk/LC_MESSAGES/tcsh.cat
225%{_mandir}/man1/csh.1*
226%{_mandir}/man1/tcsh.1*
945c0ef7 227
411bfd85 228%if %{with static}
63346b4a
JR
229%files static
230%defattr(644,root,root,755)
a3a19f15 231%attr(755,root,root) %{_bindir}/tcsh.static
411bfd85 232%endif
This page took 0.106804 seconds and 4 git commands to generate.