Permission denied Hello world Yocto/Openembedded - c

I want to cross compile with Yocto a simple C Hello World for my Colibri iMX7 from Toradex.
The tree of my meta-hellow is as follow :
meta-hellow
├── conf
│ └── layer.conf
└── recipes-myhello
└── files
└── helloworld.c
└── README.TXT
└── myhello_0.0.bb
helloworld.c :
#include <stdio.h>
int main(int argc, char** argv)
{
printf("Hello World!\n");
return 0;
}
myhello_0.0.bb inspired from this one :
DESCRIPTION = "Hello world program"
#To prevent the LICENSE field not set error
LICENSE = "CLOSED"
PR = "r0"
SRC_URI = "file://helloworld.c \
file://README.txt"
do_compile() {
${CC} ${CFLAGS} ${LDFLAGS} ${WORKDIR}/helloworld.c -o helloworld
}
do_install() {
install -m 0755 -d ${D}${bindir} ${D}${docdir}/helloworld
install -m 0644 ${S}/helloworld ${D}${bindir}
install -m 0644 ${WORKDIR}/README.txt ${D}${docdir}/helloworld
}
I have added my layer in my my bblayers.conf like so ${TOPDIR}/../layers/meta-hellow \ and added the package in the local.conf like so IMAGE_INSTALL_append = "myhello".
But the problem I have, after installing it on my board with opkg install, is as follow :
root#colibri-imx7:~# myhello
-sh: /usr/bin/myhello: Permission denied
Why is there a Permission denied since I'm root ? Thank you for your help !

install -m 0644 ${S}/helloworld ${D}${bindir}
You are telling install to set no execute permission for anyone: try "0755" instead.

Related

No rule to make target in GCC Makefile

This is the following Makefile at issue:
#
# Compiler flags
#
CC = gcc
CFLAGS = -Wall -Werror -Wextra
#
# Project files
# example -
# SRCS = hash_table.c linked_list.c utils.c common.c business_logic.c user_interface.c
# SRCS = test/gc_test.c src/gc.c
SRCS := $(shell find . -name "*")
OBJS = $(SRCS:.c=.o)
EXE = output.out
FILENAMES := $(shell find . -type f -name "*.c" -printf "%f\n")
FILENAMES_OUT = $(FILENAMES:.c=.o)
#
# Default build settings
#
BUILDDIR = build
BUILDCFLAGS = -g -O0
BUILDEXE = $(BUILDDIR)/$(EXE)
BUILDOBJS = $(addprefix $(BUILDDIR)/, $(FILENAMES_OUT))
# Rules for default build
all: clean build
build: $(BUILDEXE)
$(BUILDEXE): $(BUILDOBJS)
$(CC) $(CFLAGS) $(BUILDCFLAGS) -o $(BUILDEXE) $^ -lcunit
$(BUILDDIR)/%.o: %.c
$(CC) $(CFLAGS) $(BUILDCFLAGS) -c $< -o $#
memtest: $(BUILDEXE)
valgrind --leak-check=full ./$<
#
# Other rules
#
clean:
mkdir -p $(BUILDDIR)
PROBLEM -> make: *** No rule to make target `build/gc_test.o', needed by `build/output.out'. Stop.
PROJECT TREE
.
├── build
├── doc
│   └── design.md
├── Makefile
├── proj
│   ├── code_quality_report.md
│   ├── deviations.md
│   ├── individual_reflection.md
│   ├── team_reflection.md
│   └── test_report.md
├── README.md
├── src
│   ├── gc.c
│   └── headers
│   └── gc.h
└── tests
└── gc_test.c
The issue itself happens in $(BUILDEXE): $(BUILDOBJS) where the dependencies are gc_test.c gc.c. Those dependencies SHOULD get caught in the function below it, because it's input is all the .c files in the build directory. Those files SHOULD get properly matched and then compiled to .o files which then should climb up the tree and produce an executable. I'm confused because $(BUILDOBJS) should be the same as $(BUILDDIR)/%.o.
I'm new to making Makefiles, but I want to get better at it. Please point out better naming conventions or terminology that could have been used better for this post. Thanks!
The problem is here:
FILENAMES := $(shell find . -type f -name "*.c" -printf "%f\n")
This is wrong because -printf "%f\n" prints only the filenames, without any path. You're losing all information about the path where files are found, so how can make find them?
You should change this to simply -print then it will work.

Linking to a local C library for Rust with FFI

I am trying to wrap a quite large C library in Rust. I used bindgen to generate the bindings. Rust seems content with those. However, despite my different attempts and my many reads of the build-script docs, I keep on getting linking issues.
The library I'm using has a set of csh script which end up building two .a files: cspice.a and csupport.a. They are both stored in the cspice_linux_gcc_64bit/lib of my project (cf. the tree at bottom).
I currently test the proper binding by calling constants and functions from my tests, cf. lib.rs (on my Github).
I highly suspect that something is wrong with my build.rs or, less likely, my Cargo.toml.
Linking error
Running `rustc --crate-name spice src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=94c06ffe4bfd7d5f -C extra-filename=-94c06ffe4bfd7d5f --out-dir /home/chris/Workspace/rust/SPICE/target/debug/deps -L dependency=/home/chris/Workspace/rust/SPICE/target/debug/deps -L native=cspice_linux_gcc_64bit/lib -l static=cspice`
error: could not find native static library `cspice`, perhaps an -L flag is missing?
error: Could not compile `spice`.
Caused by:
process didn't exit successfully: `rustc --crate-name spice src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=94c06ffe4bfd7d5f -C extra-filename=-94c06ffe4bfd7d5f --out-dir /home/chris/Workspace/rust/SPICE/target/debug/deps -L dependency=/home/chris/Workspace/rust/SPICE/target/debug/deps -L native=cspice_linux_gcc_64bit/lib -l static=cspice` (exit code: 101)
Build failed, waiting for other jobs to finish...
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/chris/Workspace/rust/SPICE/target/debug/deps/spice-e22b64d176595306.0.o" "-o" "/home/chris/Workspace/rust/SPICE/target/debug/deps/spice-e22b64d176595306" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/home/chris/Workspace/rust/SPICE/target/debug/deps" "-L" "cspice_linux_gcc_64bit/lib" "-L" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "-l" "cspice" "-Wl,--no-whole-archive" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libtest-163c20e386ec0612.rlib" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgetopts-bd312ea730ea22d0.rlib" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libterm-4959b4e709084e0a.rlib" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-35ad9950c7e5074b.rlib" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-fb44afc024bbc636.rlib" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-14b8f3202acdad6a.rlib" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-20a50a22d4c2b1e9.rlib" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcollections-b479831207997444.rlib" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-10b591f1a68dd370.rlib" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-28913dc5a1e63cd7.rlib" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-6ecacccb5bdc4911.rlib" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_unicode-f4f0ae88f5ad8ad4.rlib" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-bfaa82017ca17cb2.rlib" "/home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-863b57a66ba6c3e1.rlib" "-Wl,-Bdynamic" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util"
= note: /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lcspice
collect2: error: ld returned 1 exit status
error: aborting due to previous error(s)
error: Could not compile `spice`.
Caused by:
process didn't exit successfully: `rustc --crate-name spice src/lib.rs --emit=dep-info,link -C debuginfo=2 --test -C metadata=e22b64d176595306 -C extra-filename=-e22b64d176595306 --out-dir /home/chris/Workspace/rust/SPICE/target/debug/deps -L dependency=/home/chris/Workspace/rust/SPICE/target/debug/deps -L native=cspice_linux_gcc_64bit/lib -l static=cspice` (exit code: 101)
build.rs
extern crate bindgen;
use std::env;
use std::path::PathBuf;
fn main() {
let out_dir = env::var("OUT_DIR").unwrap();
// Tell cargo to tell rustc to link the system bzip2
// shared library.
println!("cargo:rustc-link-search=native=cspice_linux_gcc_64bit/lib");
println!("cargo:rustc-link-lib=static=cspice");
//println!("cargo:rustc-flags=-L cspice_linux_gcc_64bit/lib");
// The bindgen::Builder is the main entry point
// to bindgen, and lets you build up options for
// the resulting bindings.
let bindings = bindgen::Builder::default()
// The input header we would like to generate
// bindings for.
.header("spice_wrapper.h")
// Finish the builder and generate the bindings.
.generate()
// Unwrap the Result and panic on failure.
.expect("Unable to generate bindings");
let out_path = PathBuf::from(out_dir.clone());
// Write the bindings to the $OUT_DIR/bindings.rs file.
bindings
.write_to_file(out_path.join("spice_bindings.rs"))
.expect("Couldn't write bindings!");
}
Cargo.toml
[package]
(...)
links = "cspice"
build = "build.rs"
[build-dependencies]
bindgen = "0.26.3"
[dependencies]
Tree
.
├── build.rs
├── Cargo.lock
├── Cargo.toml
├── cspice_linux_gcc_64bit
│   ├── data
│   ├── doc
│   ├── etc
│   ├── exe
│   ├── include
│   ├── lib
│   ├── makeall.csh
│   └── src
├── spice_wrapper.h
├── src
│   └── lib.rs
└── target
└── debug
building two .a files: cspice.a and csupport.a
On Linux, static libraries are generally called libfoo.a, but your library doesn't have the lib prefix.
Renaming the file to libcspice.a should allow it to compile. I'm not sure if you'd want to modify your build script or the libraries build script to perform the renaming. It's even possible that the library itself has a compilation switch to use a platform-standard naming scheme.

Error while executing cross-compiled program for openwrt

I'm trying to export a software to openwrt and i'm able to generate the ipk but the compiled file always gives me this error
-ash: scanReportProbe: not found
I've tried everything but i'm not able to make it work.
To be complete this is what i have done to prepare the environment:
git clone git://github.com/openwrt/openwrt.git
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make prereq
make menuconfig
[here i selected the package with the M and saved the configuration]
make tools/install
make toolchain/install
make package/scanReport_probe/compile
I have no idea of to fix this error so i need some hint of solution.
I don't think that the error is in the code but in casse is needed this is my program:
file structure
scanReport_probe
├── LICENSE
├── Makefile
├── README.md
└── src
├── data
│ └── THIS IS FOR DATA FILES.txt
├── runScript
│ └── scanReportProbe
├── scanReport_probe
│ ├── a.c
│ └── makefile
└── scanReport_probe.conf
makefile for openwrt
include $(TOPDIR)/rules.mk
# name of package
# version number of the sources you're using
# how many times you've released a package based on the above version number
PKG_NAME:=scanReport_probe
PKG_VERSION:=1.0
PKG_RELEASE:=1
PKG_LICENSE:=MIT
# sources will be unpacked into this directory (you shouldn't need to change this)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
#needed
include $(INCLUDE_DIR)/package.mk
# Metadata; information about what the package is for the ipkg listings
# to keep things simple, a number of fields have been left at their defaults
# and are not shown here.
define Package/scanReport_probe
SECTION:=utils
CATEGORY:=Utilities
TITLE:=scanReport_probe
URL:=https://github.com/luigiDB/scan-report_probe
TITLE:=Scan in monitor mode probe over wifi channel with periodic report to a server through http post.
MAINTAINER:=Please refer to github repository page
endef
define Package/scanReport_probe/description
This is the best tool ever.
Scan probe over wifi and at regualar interval send results via http post.
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
CONFIGURE_VARS+= \
CC="$(TOOLCHAIN_DIR)/bin/$(TARGET_CC)"
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/scanReport_probe $(TARGET_CONFIGURE_OPTS)
endef
# We'll use the OpenWrt defaults to configure and compile the package. Otherwise we'd need to define
# Build/Configure - commands to invoke a configure (or similar) script
# Build/Compile - commands used to run make or otherwise build the source
define Package/scanReport_probe/install
# Now that we have the source compiled (magic huh?) we need to copy files out of the source
# directory and into our ipkg file. These are shell commands, so make sure you start the lines
# with a TAB. $(1) here represents the root filesystem on the router.
# INSTALL_DIR, INSTALL_BIN, INSTALL_DATA are used for creating a directory, copying an executable,
# or a data file. +x is set on the target file for INSTALL_BIN, independent of it's mode on the host.
# make a directory for the config
$(INSTALL_DIR) $(1)/etc/scanReport_probe/
# copy the config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/scanReport_probe.conf $(1)/etc/scanReport_probe
# make a directory for some random data files required by scanReport_probe
$(INSTALL_DIR) $(1)/usr/share/scanReport_probe
# copy the data files
$(INSTALL_DATA) $(PKG_BUILD_DIR)/data/* $(1)/usr/share/scanReport_probe
#make directory bin
$(INSTALL_DIR) $(1)/bin
# copy the binary
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scanReport_probe/scanReportProbe $(1)/bin
#make the directory init.d in case isn't present
$(INSTALL_DIR) $(1)/etc/init.d
#copy script to init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/runScript/scanReportProbe $(1)/etc/init.d
endef
#runned post installation call the enable on the service
define Package/scanReport_probe/postinst
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
echo "Enabling rc.d symlink for scanReportProbe"
/etc/init.d/scanReportProbe enable
fi
exit 0
endef
#runned pre uninstallation call the disable on the service
define Package/scanReport_probe/prerm
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
echo "Removing rc.d symlink for scanReportProbe"
/etc/init.d/scanReportProbe disable
fi
exit 0
endef
$(eval $(call BuildPackage,scanReport_probe))
a.c
#include <stdio.h>
int main(void)
{
printf("Hello World\n");
return 0;
}
makefile for c program
PROFILE = -O2 -s
CFLAGS = $(PROFILE)
LDFLAGS =
all: main
# build it
main: a.o
$(CC) $(LDFLAGS) a.o -o scanReportProbe
a.o: a.c
$(CC) $(CFLAGS) -c a.c
# clean it
clean:
rm *.o a
For -ash, IIRC, ash is a [boot] shell. It is saying that it can't find a particular command.
So, it may be one of:
(1) In your rc script section, you're doing /etc/init.d/scanReportProbe enable but the package you're building uses scanReport_probe. So, you may need to add or remove an _ here or there and/or some other renames so things match up.
(2) If the file structure you gave is the final one, I'm not sure the script is in the right directory.
(3) Are the permissions for the script correct (i.e. has execute)?

How can I use the check testing framework from Clion and Cmake?

I use the check testing framework to unit test my C code. The test when it's run looks like this.
$ checkmk tst_bquotes.check > bquotes-test.c
dac#dac-Latitude-E7450:~/kth/os/lab3/openshell$ gcc -Wall -o bquotes-test util.c errors.c bquotes-test.c -lcheck -lsubunit -lrt -pthread -lm
dac#dac-Latitude-E7450:~/kth/os/lab3/openshell$ ./bquotes-test
Running suite(s): Core
100%: Checks: 1, Failures: 0, Errors: 0
How can I add this test to my cmake build script?
cmake_minimum_required(VERSION 3.0)
project(shell.test)
if (EDITLINE_LIBRARIES AND EDITLINE_INCLUDE_DIRS)
set(Editline_FIND_QUIETLY TRUE)
endif (EDITLINE_LIBRARIES AND EDITLINE_INCLUDE_DIRS)
find_path(EDITLINE_INCLUDE_DIRS NAMES editline/readline.h)
find_library(EDITLINE_LIBRARIES NAMES edit)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Editline DEFAULT_MSG
EDITLINE_LIBRARIES
EDITLINE_INCLUDE_DIRS)
mark_as_advanced(EDITLINE_INCLUDE_DIRS EDITLINE_LIBRARIES)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -L/usr/local/include/ -L/usr/include -std=gnu99 -pedantic-errors -O3 -g -Wall -pedantic -ledit -ltermcap")
include_directories(/usr/local/include/ /usr/include)
link_directories(/usr/lib)
link_directories(/usr/local/lib)
add_executable(shell main.c errors.c util.c shellparser.c)
target_link_libraries(shell edit readline)
add_custom_target(shellparser DEPENDS ${CMAKE_SOURCE_DIR}/shellparser.c)
add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/shellparser.c COMMAND lemon -s ${CMAKE_SOURCE_DIR}/shellparser.y DEPENDS ${CMAKE_SOURCE_DIR}/shellparser.y)
add_dependencies(shell shellparser)
My project structure looks like:
$ tree
.
├── bquotes-test
├── bquotes-test.c
├── CMakeLists.txt
├── CommandEntry.h
├── do.h
├── errors.c
├── errors.h
├── integrationtest.sh
├── lemon.c
├── lempar.c
├── LICENSE
├── main.c
├── Makefile
├── openshell.h
├── README.md
├── shellparser.c
├── shellparser.h
├── shellparser.out
├── shellparser.y
├── stresstest.sh
├── tst_bquotes.check
├── tst_exp.sh
├── types.h
├── unittest.sh
└── util.c
0 directories, 25 files
My check test is
#include "openshell.h"
#include "errors.h"
#test myQtest
fail_unless(isBetweenQuotes(11, "abc'asdqerfdsdxcvc'xc") == 1, "isBetweenQuotes function borked");
fail_unless(isBetweenQuotes(5, "This has no quotes") == 0, "isBetweenQuotes2 function borked");
fail_unless(isBetweenQuotes(11, "This' is a sentence in 'quotes") == 1, "isBetweenQuotes3 function borked");
fail_unless(isBetweenQuotes(15, "\"This is a sentence in quotes\"") == 1, "isBetweenQuotes4 function borked");
/* gcc -Wall -o bquotes-test util.c errors.c bquotes-test.c -lcheck -lsubunit -lrt -pthread -lm */
/* checkmk tst_bquotes.check > bquotes-test.c */
I would try this. Create an external linux shell script, which has the line
checkmk tst_bquotes.check > bquotes-test.c
in it and call it something like prepare_test.sh. Then, I would add these lines to your CMakeLists.txt at the end:
execute_process(
COMMAND ./prepare_test.sh
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE prep_test_result)
add_executable(bquotes-test util.c errors.c bquotes-test.c )
target_link_libraries(bquotes-test check subunit rt pthread m)
add_test(start_test_bquotes bquotes-test)
include(CTest)
After you've called cmake, you can then start the tests with make test.

Create Debian package for a dolphin service menu

hi there i have a problem to generate a debian package
i have 2 files to install 1 is a BASH SCRIPT
the other is .DESKTOP FILE
/kate-folder-service-menu-0.1.0$ tree
.
└── usr
├── bin
│   └── ktexeditor-open-folder
└── share
└── kde4
└── services
└── ServiceMenus
└── kate-folder.desktop
Now i have created all the stuff, with
dh_make -s -c gpl
i have edited:
-control file
-copyright file
-rules file
in the rules file i have made :
#!/usr/bin/make -f
# %:
# dh $# --with-lzma
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
configure: configure-stamp
configure-stamp:
dh_testdir
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
touch $#
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
install --mode=777 -t debian/usr/bin usr/bin/ktexeditor-open-folder
install --mode=644 -t debian/usr/share/kde4/services/ServiceMenus usr/share/kde4/services/ServiceMenus/kate-folder.desktop
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
now i did
debuild -uc -us --source-option=--include-binaries --source-option=-isession
and finally this
sudo pbuilder build MYSTUFF.dsc
but this bastard generates the debian package without the script and the service menu :D
dpkg --contents kate-folder-service-menu_0.1.0-1_i386.deb
drwxr-xr-x root/root 0 2012-04-14 14:53 ./
drwxr-xr-x root/root 0 2012-04-14 14:53 ./usr/
drwxr-xr-x root/root 0 2012-04-14 14:53 ./usr/share/
drwxr-xr-x root/root 0 2012-04-14 14:53 ./usr/share/doc/
drwxr-xr-x root/root 0 2012-04-14 14:53 ./usr/share/doc/kate-folder-service-menu/
-rw-r--r-- root/root 201 2012-04-12 11:16 ./usr/share/doc/kate-folder-service-menu/README.Debian
-rw-r--r-- root/root 1239 2012-04-12 15:31 ./usr/share/doc/kate-folder-service-menu/copyright
-rw-r--r-- root/root 152 2012-04-12 15:55 ./usr/share/doc/kate-folder-service-menu/changelog.Debian.gz
That must be an ancient dh_make if it's giving you old-style debhelper rules.
I suggest a modern minimal debian/rules:
#!/usr/bin/make -f
%:
dh $#
Then put this in debian/install:
usr/bin/ktexeditor-open-folder
usr/share/kde4/services/ServiceMenus/kate-folder.desktop
That'll use dh_install to put them in the right place, and do all the other usual stuff to generate the package.

Resources