summaryrefslogblamecommitdiffstats
path: root/core/modules/idleaction/module.build
blob: 6aac9d9314301eb4c1e84d59be8bf11d0da7ed9e (plain) (tree)
1
2
3
4
5
6
7
8
9
           
                
                 





                                                                                         
                                                                                                                      
                                                                     

                                                                                                                 








                                                                           





             
#!/bin/bash
fetch_source() {
	autoclone
}

build() {
	# We ship xprintidle's source as suse doesn't have it in one of the default repos
	# and its just too tiny to do anything fancy like fetching source from somewhere
	mkdir -p "$MODULE_BUILD_DIR/opt/openslx/bin"
	gcc -std=c99 -o "$MODULE_BUILD_DIR/opt/openslx/bin/xprintidle" "$MODULE_DIR/xprintidle.c" -lX11 -lXss -lXext \
			|| perror "Compilation of xprintidle failed!"
	gcc -std=c99 -o "$MODULE_BUILD_DIR/opt/openslx/bin/xprintlocktime" "$MODULE_DIR/xprintlocktime.c" -lX11 \
			|| perror "Compilation of xprintlocktime failed!"
	# idle-daemon
	local SRCDIR="${MODULE_WORK_DIR}/src/idle-daemon"

	mkdir -p "$MODULE_BUILD_DIR/opt/openslx/sbin"
	cd "${MODULE_BUILD_DIR}/opt/openslx/sbin" || perror "Could not cd!"
	pinfo "Running cmake"
	cmake "$SRCDIR" || perror "'cmake $SRCDIR' failed."
	pinfo "Running make"
	make || perror "'make' failed."
}

post_copy() {
	:
}