Skip to content

Commit

Permalink
add install section to all .pro files
Browse files Browse the repository at this point in the history
remove lib section & most of bin section from octopi.pro
adjust PKGBUILD to use make install in each subdir
cp the needed .png in prepare, or ship in the resources dir?
  • Loading branch information
demmm committed Sep 26, 2016
1 parent 56e1d55 commit 97d244c
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 12 deletions.
24 changes: 20 additions & 4 deletions PKGBUILD
Expand Up @@ -18,16 +18,18 @@ source=("https://github.com/aarnt/octopi/archive/v${pkgver}.tar.gz")
md5sums=('669b6fa406ad64c65d9f548996cb3d8c')

prepare() {
cd ${pkgname}-${pkgver}/
cd ${pkgname}-${pkgver}

# enable the kstatus switch, disable if you wish to build without Plasma/knotifications support
sed -e "s|# DEFINES += KSTATUS| DEFINES += KSTATUS|" -i notifier/octopi-notifier/octopi-notifier.pro
# enable alpm backend, disable if you wish to build without alpm_octopi_utils
sed -e "s|#ALPM_BACKEND|ALPM_BACKEND|" -i octopi.pro

cp resources/images/octopi_green.png resources/images/octopi.png
}

build() {
cd ${pkgname}-${pkgver}/
cd ${pkgname}-${pkgver}

qmake-qt5 octopi.pro
make
Expand All @@ -53,7 +55,21 @@ build() {
}

package() {
cd ${pkgname}
cd ${pkgname}-${pkgver}
make INSTALL_ROOT=${pkgdir} install

cd notifier/pacmanhelper
make INSTALL_ROOT=${pkgdir} install
cd ../..

make INSTALL_ROOT=${pkgdir}/ install
cd notifier/octopi-notifier
make INSTALL_ROOT=${pkgdir} install
cd ../..

cd repoeditor
make INSTALL_ROOT=${pkgdir} install
cd ..

cd cachecleaner
make INSTALL_ROOT=${pkgdir} install
}
15 changes: 15 additions & 0 deletions cachecleaner/octopi-cachecleaner.pro
Expand Up @@ -93,3 +93,18 @@ TRANSLATIONS += resources/translations/octopi_cachecleaner_pt_BR.ts \
resources/translations/octopi_cachecleaner_hr.ts \
resources/translations/octopi_cachecleaner_zh-Hans.ts
resources/translations/octopi_cachecleaner_zh_CN.ts

# install
isEmpty(PREFIX) {
PREFIX = /usr
}

isEmpty(BINDIR) {
BINDIR = $$PREFIX/bin
}

target.path = $$BINDIR
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = .

INSTALLS += target
15 changes: 15 additions & 0 deletions notifier/octopi-notifier/octopi-notifier.pro
Expand Up @@ -82,3 +82,18 @@ FORMS += ../../ui/transactiondialog.ui \

RESOURCES += \
../../resources.qrc

# install
isEmpty(PREFIX) {
PREFIX = /usr
}

isEmpty(BINDIR) {
BINDIR = $$PREFIX/bin
}

target.path = $$BINDIR
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = .

INSTALLS += target
15 changes: 15 additions & 0 deletions notifier/pacmanhelper/pacmanhelper.pro
Expand Up @@ -21,3 +21,18 @@ HEADERS += pacmanhelper.h \
SOURCES += main.cpp \
pacmanhelper.cpp \
pacmanhelperadaptor.cpp

# install
isEmpty(PREFIX) {
PREFIX = /usr
}

isEmpty(LIBDIR) {
LIBDIR = $$PREFIX/lib
}

target.path = $$LIBDIR/octopi
sources.files = $$SOURCES $$HEADERS *.pro
sources.path = .

INSTALLS += target
10 changes: 2 additions & 8 deletions octopi.pro
Expand Up @@ -173,9 +173,6 @@ autostart.path = $$ETCDIR/xdg/autostart
autostart.files += octopi-notifier.desktop

bin.path = $$BINDIR
bin.files = cachecleaner/bin/octopi-cachecleaner \
notifier/bin/octopi-notifier \
repoeditor/bin/octopi-repoeditor
bin.files += speedup/speedup-octopi.sh

dbus.path = $$ETCDIR/dbus-1/system.d
Expand All @@ -194,14 +191,11 @@ icon.path = $$DATADIR/icons
icon.files += resources/images/octopi.png
icon.files += resources/images/octopi_green.png
icon.files += resources/images/octopi_red.png
icon.files += resources/images/octopi_yellow
icon.files += resources/images/octopi_yellow.png

interfaces.path = $$DATADIR/dbus-1/interfaces
interfaces.files += notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.xml

lib.path = $$LIBDIR/octopi
lib.files = notifier/bin/pacmanhelper

license.path = $$DATADIR/licenses/octopi
license.files += LICENSE

Expand All @@ -214,4 +208,4 @@ service.files += speedup/octopi.service
sys_service.path = $$DATADIR/dbus-1/system-services
sys_service.files += notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.service

INSTALLS += target autostart bin dbus desktop gnome icon interfaces lib license polkit service sys_service
INSTALLS += target autostart bin dbus desktop gnome icon interfaces license polkit service sys_service
15 changes: 15 additions & 0 deletions repoeditor/octopi-repoeditor.pro
Expand Up @@ -87,3 +87,18 @@ TRANSLATIONS += resources/translations/octopi_repoeditor_pt_BR.ts \
resources/translations/octopi_repoeditor_hr.ts \
resources/translations/octopi_repoeditor_zh-Hans.ts
resources/translations/octopi_repoeditor_zh_CN.ts

# install
isEmpty(PREFIX) {
PREFIX = /usr
}

isEmpty(BINDIR) {
BINDIR = $$PREFIX/bin
}

target.path = $$BINDIR
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = .

INSTALLS += target

0 comments on commit 97d244c

Please sign in to comment.