### this file is sourced not run
PKGVER=72.1
PKGBUILD=1
PKGARCH=x86_64

# cutdown (kirk)
TARBALL=libicu-nls-devx$PKGVER-$PKGARCH-$PKGBUILD.txz
MD5SUM=
SRC_URL=libicu-full-$PKGVER-$PKGARCH-$PKGBUILD.txz
BUNDLE=

SLACKREQ=
SLACKDESC="libicu-nls-devx: libicu-nls-devx $PKGVER (Unicode library)  
libicu-nls-devx:  
libicu-nls-devx: NOTE: libicu-nls-devx contains a set of cut-down locals. The locals removed
libicu-nls-devx: from libicu-nls-devx are in this package and are for the nls and devx sfs
libicu-nls-devx: files. 
libicu-nls-devx:   
libicu-nls-devx: 
libicu-nls-devx: 
libicu-nls-devx: 
libicu-nls-devx: 
libicu-nls-devx: 
"
PKG_NOMAKEPKG=yes
PKG_NOBUILD=yes

### nothing to download
unset -f pkg_download

pkg_prepare() {
	: do nothing
}

pkg_package() {
if  [ -e $OUTPUT_DIR/$SRC_URL ] ; then
	echo extracting $SRC_URL
	mkdir tmp/libicu
	tar -xf $OUTPUT_DIR/$SRC_URL -C tmp/libicu
		
	#Cutdown icu data directory
	cd tmp/libicu
	for FOLDERS in . coll rbnf curr lang region unit zone ; do
	find ./usr/share/icu/$PKGVER/icudt*/$FOLDERS -maxdepth 1 -type f \
	\( -name de.res \
	-o -name de_.res \
	-o -name likelySubtags.res \
	-o -name en.res \
	-o -name en_US.res \
	-o -name en_US_POSIX.res \
	-o -name en_001.res \
	-o -name en_150.res \
	-o -name en_GB.res \
	-o -name en_AU.res \
	-o -name en_CA.res \
	-o -name es.res \
	-o -name es_.res \
	-o -name es_419.res \
	-o -name es_MX.res \
	-o -name es_US.res \
	-o -name fr.res \
	-o -name fr_CA.res \
	-o -name it.res \
	-o -name ucadata.icu \
	-o -name pool.res \
	-o -name res_index.res \
	-o -name supplementalData.res \
	-o -name currencyNumericCodes.res \
	-o -name dayPeriods.res \
	-o -name genderList.res \
	-o -name icustd.res \
	-o -name icuver.res \
	-o -name keyTypeData.res \
	-o -name metaZones.res \
	-o -name metadata.res \
	-o -name numberingSystems.res \
	-o -name plurals.res \
	-o -name root.res \
	-o -name *.spp \
	-o -name timezoneTypes.res \
	-o -name unames.icu \
	-o -name windowsZones.res \
	-o -name zoneinfo64.res \
	-o -name confusables.cfu \
	-o -name cnvalias.icu \
	-o -name uts46.nrm \
	-o -name pl.res \)  -delete
	done
	
	rm -r ./usr/share/icu/$PKGVER/icudt*/brkitr
	rm -r ./usr/share/icu/$PKGVER/icudt*/translit
	rm -r ./etc
	rm -r ./usr/bin
	rm -r ./usr/sbin
	rm -r ./usr/lib64
	rm -r ./usr/include
	rm -r ./usr/src
	rm -r ./usr/share/man
	rm -r ./usr/share/icu/$PKGVER/config

	# build the package
	pkg_package_dir .		
else
	return 1
fi
}

pkg_build() { 
	: do nothing
}
