summaryrefslogblamecommitdiffstats
path: root/core/modules/cups-sicgs/module.build
blob: 874176c4657a4816db2f929db13b442e5d3a7bb5 (plain) (tree)
1
2
3
4
5
6
7
8



                



                                                                          


         
                                     
                                
                                                                                                        
                                               
                                                                                                                  











                                                                                              
#!/bin/bash


fetch_source() {
	[ -s "${MODULE_WORK_DIR}/src/driver.zip" ] && return 0
	rm -rf -- "${MODULE_WORK_DIR}/src"
	mkdir -p "${MODULE_WORK_DIR}/src"
	download "${REQUIRED_ARCHIVE}" "${MODULE_WORK_DIR}/src/driver.zip"
}

build() {
	cde "${MODULE_WORK_DIR}/src/"
	# Initial archive is zip
	unzip -j -o "${MODULE_WORK_DIR}/src/driver.zip" || perror "Could not extract initial driver.zip"
	# Then we have two tgz, 32bit and 64bit
	tar -x -f *${X86_64_I386}*.tar* --wildcards '*/sic*' || perror "Could not extract binaries from inner tar"

	mkdir -p "${MODULE_BUILD_DIR}/usr/bin"
	find . -name "sic*" -type f -executable -exec cp {} "${MODULE_BUILD_DIR}/usr/bin" \; \
		|| perror "Could not copy sic* binaries to module build dir"

	cd - &>/dev/null
}

post_copy() {
	:
}