-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall
32 lines (27 loc) · 1.22 KB
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
# Simple installer for dcraw executable, manpages, and message catalogs.
# Dave Coffin, dcoffin a cybercom o net
# You will need these:
# apt-get install libjasper-dev libjpeg8-dev liblcms2-dev gettext iconv
prefix=/usr/local
gcc -O4 -march=native -o $prefix/bin/dcraw dcraw.c \
-Wall -Wno-unused-result -Wno-array-bounds -Wno-maybe-uninitialized \
-Wno-unused-but-set-variable \
-lm -ljasper -ljpeg -llcms2 -s -DLOCALEDIR=\"$prefix/share/locale/\"
mkdir -p -m 755 $prefix/share/man/man1
cp dcraw.1 $prefix/share/man/man1
# Please help me add more languages
for langchar in \
fr.latin1 it.latin1 de.latin1 pt.latin1 es.latin1 nl.latin1 sv.latin1 \
ca.latin1 da.latin1 cs.latin2 hu.latin2 pl.latin2 ro.latin2 eo.latin3 \
ru.koi8-r ja.euc-jp zh_TW.big5 zh_CN.gb2312
do
lang=`echo $langchar | cut -d. -f1`
char=`echo $langchar | cut -d. -f2-`
mkdir -p -m 755 $prefix/share/man/$lang/man1
iconv -f utf-8 -t $char dcraw_$lang.1 > $prefix/share/man/$lang/man1/dcraw.1
mkdir -p -m 755 $prefix/share/man/$lang.UTF-8/man1
cp dcraw_$lang.1 $prefix/share/man/$lang.UTF-8/man1/dcraw.1
mkdir -p -m 755 $prefix/share/locale/$lang/LC_MESSAGES
msgfmt -o $prefix/share/locale/$lang/LC_MESSAGES/dcraw.mo dcraw_$lang.po
done