include ../Makefile.config
include Makefile.config
PACKAGE = drakxtools
PKGVERSION = $(VERSION)
POFILES = $(shell ls share/po/*.po)
MOFILES = $(POFILES:%.po=%.mo)
OTHERS = $(OTHERDIRS) $(OTHERFILES)
OTHERDIRS = tools/serial_probe
OTHERFILES = tools/rpcinfo-flushed.c
.PHONY: all $(DIRS) install clean
all: TAGS $(DIRS)
xs: $(DIRS)
TAGS: $(ALLPMS)
-etags $^ /usr/lib/perl5/*/*/MDK/Common/*.pm
clean:
for i in $(DIRS) share/po install/help/po install/share/po; do $(MAKE) -C $$i clean; done;:
rm -rf auto drakxtools*.tar* *.bak
find . -name "*~" -o -name ".#*" -o -name "TAGS" -o -name "*.old" | xargs rm -f
rm -rf $(PACKAGE)-$(PKGVERSION)*
check_pms_encoding:
@for i in $(ALLPMS); do charset=ascii; grep -q 'use utf8' $$i && charset=utf8; iconv -f $$charset -t $$charset $$i >/dev/null || { echo "bad $$charset character in $$i"; exit 1; }; done
check_full: check_pms_encoding
perl -I. -Mlang -e 'lang::check'
check2:
perl -I. -Mkeyboard -e 'keyboard::check'
$(DIRS):
install -d auto
$(MAKE) -C $@
test_pms:
perl_checker install/install2.pm install/steps_gtk.pm install/steps_stdio.pm partition_table/*.pm standalone/{harddrake2,diskdrake,draksec}
test_pms_all:
perl_checker -v --generate-package-dependencies-graph .deps $(ALLPMS)
%.mo: %.po
msgfmt -o $@ $<
install_pms stage2 full_stage2:
make -C install $@
mo_files : $(MOFILES)
# rules to build tarball
dist: tar
tar: clean
rm -rf $(PACKAGE)*.tar* $(PACKAGE)-$(PKGVERSION)
mkdir -p $(PACKAGE)-$(PKGVERSION)/tools
(cd ..; git archive HEAD "perl-install/" $(OTHERS) kernel/list_modules.pm Makefile.config) | tar xC $(PACKAGE)-$(PKGVERSION)
rm -rf $(PACKAGE)-$(PKGVERSION)/perl-install/{install,unused,list_modules.pm}
cp -f ../kernel/list_modules.pm $(PACKAGE)-$(PKGVERSION)/perl-install
cd $(PACKAGE)-$(PKGVERSION)/perl-install ; mv -f Makefile.drakxtools Makefile
@make nuke_perl
tar cfa $(PACKAGE)-$(PKGVERSION).tar.xz $(PACKAGE)-$(PKGVERSION)
rm -rf $(PACKAGE)-$(PKGVERSION)
$(info $(PACKAGE)-$(PKGVERSION).tar.xz is ready)
git tag $(VERSION)
# rules to build a distributable rpm
nuke_perl:
find $(PACKAGE)-$(PKGVERSION)/perl-install -name '*.pm' | xargs ../tools/simplify-drakx-modules
find $(PACKAGE)-$(PKGVERSION)/perl-install/standalone -type f | xargs ../tools/simplify-drakx-modules
# [pixel] for my grep looking for any .pm files
pixel_standalone_links:
rm -rf .standalone_apps.swa
mkdir .standalone_apps.swa
for i in $(STANDALONEPMS_); do ln -sf ../standalone/$$i .standalone_apps.swa/$$i.pm; done
check_perl_checker:
rm -f share/po/libDrakX.pot install/share/po/DrakX.pot
@make -C share/po libDrakX.pot
@make -C install/share/po DrakX.pot
HP-branch
blob: 652b82dd59c4c0f5b2c25ecce5234eca846d15b4 (
plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#!/bin/sh
rm -rf .tmp ; mkdir .tmp ; cd .tmp
tar xfj ../locales-skeleton.tar.bz2
# locale utf-8
for i in LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_MESSAGES/SYS_LC_MESSAGES ; do
install -D -m 644 /usr/share/locale/UTF-8/$i usr/share/locale/UTF-8/$i
done
# lc_ctype for non common encodings
rm -rf .tmp2 ; mkdir .tmp2 ; cd .tmp2
for i in ja ko ; do
ii=locales-`echo $i | sed 's/\(..\).*/\1/'`
rpm2cpio /RPMS/$ii-*.rpm | cpio -id --quiet
f=usr/share/locale/$i/LC_CTYPE
[ -e $f ] || { echo missing $f in package $ii ; exit 1 ; }
install -D -m 644 $f ../$f
(cd ../usr/share/locale/$i ; ln -s ../UTF-8/* . 2>/dev/null)
rm -rf *
done
cd .. ; rm -rf .tmp2
# special case for chineese (why is it needed?)
rm -rf .tmp2 ; mkdir .tmp2 ; cd .tmp2
for i in zh_CN.GB2312 zh_TW.Big5 ; do
ii=locales-`echo $i | sed 's/\(..\).*/\1/'`
rpm2cpio /RPMS/$ii-*.rpm | cpio -id --quiet
for f in LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_MESSAGES/SYS_LC_MESSAGES ; do
f=usr/share/locale/$i/$f
[ -e $f ] || { echo missing $f in package $ii ; exit 1 ; }
install -D -m 644 $f ../$f
done
rm -rf *
done
cd .. ; rm -rf .tmp2
(cd usr/share/locale ; mv zh_CN.GB2312 GB2312 ; mv zh_TW.Big5 BIG5)
perl -I../.. ../gen_locales.pl || exit 1
for i in common C en_US.UTF-8 iso8859-1 ja ko tscii-0 zh_CN zh_TW.big5 ; do
cp -a /usr/X11R6/lib/X11/locale/$i usr/X11R6/lib/X11/locale
done
tar cfj ../locales.tar.bz2 usr
cd .. ; rm -rf .tmp
|