View Single Post
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#13
Originally Posted by Sasler View Post
OK, this is how my src.pro file looks like now:
Code:
TARGET = timer
HEADERS += src/form.h \
    src/settings.h
SOURCES += qtmain.cpp \
    src/form.cpp \
    src/settings.cpp
FORMS += src/form.ui \
    src/settings.ui

# LEXS#
LEXSOURCES +=

# YACCS#
YACCSOURCES +=
INCLUDEPATH +=
LIBS +=
DEFINES +=

# All generated files goes same directory
OBJECTS_DIR = build
MOC_DIR = build
UI_DIR = build
DESTDIR = build
TEMPLATE = app
DEPENDPATH +=
VPATH += src \
    uis
CONFIG -=
CONFIG += debug
QT = core \
    gui
MY_BIN_PATH = /usr/bin/

# Default installation overwritten because qmake and debian both
# uses DESTDIR in different purposes
install.commands = -$(INSTALL_PROGRAM) \
    $(TARGET) \
    \"$(DESTDIR)\"$$MY_BIN_PATH$(QMAKE_TARGET)
install.depends = $(TARGET)

# Targets for debian source and binary package creation
debian-src.commands = dpkg-buildpackage \
    -S \
    -r \
    -us \
    -uc \
    -d
debian-bin.commands = dpkg-buildpackage \
    -b \
    -r \
    -uc \
    -d
debian-all.depends = debian-src \
    debian-bin

# Clean all but Makefile
compiler_clean.commands = -$(DEL_FILE) \
    $(TARGET)
QMAKE_EXTRA_TARGETS += debian-all \
    debian-src \
    debian-bin \
    install \
    compiler_clean
RESOURCES =


unix {
    #VARIABLES
    isEmpty(PREFIX) {
        PREFIX = /usr/local
  }

BINDIR = $$PREFIX/bin
DATADIR =$$PREFIX/share

DEFINES += DATADIR=\"$$DATADIR\" PKGDATADIR=\"$$PKGDATADIR\"

#MAKE INSTALL

INSTALLS += target desktop

  target.path =$$BINDIR

  desktop.path = $$DATADIR/applications/hildon
  desktop.files += $${TARGET}.desktop

}
But I get the following error when trying to mad dpkg-buildpackage:
Code:
make: *** [configure-stamp] Error 1
dpkg-buildpackage: failure: debian/rules build gave error exit status 2
not a 100% sure but maybe due to the spaces prefixing these lines

target.path =$$BINDIR

desktop.path = $$DATADIR/applications/hildon
desktop.files += $${TARGET}.desktop
 

The Following User Says Thank You to krk969 For This Useful Post: