My Makefile wont compile

66 views
Skip to first unread message

Jason Content

unread,
Feb 19, 2016, 7:29:12 AM2/19/16
to The Luggage
Hi Guys, Im new to luggage and have been following tutorials online, but I cant seem to get this to compile it has two application files in it that are from apps. Here is the Makefile code. 

USE_PKGBUILD=1
include /usr/local/share/luggage/luggage.make
TITLE=OneDrivePkg
REVERSE_DOMAIN=com.grahamgilbert
PAYLOAD=OneDrive.app.tar.bz2\
OneDriveConfiguration.app.tar.bz2

pack-OneDrive: l_usr_local_bin
@sudo ${CP} ./OneDrive.app.tar.bz2 ${WORK_D}/Application/OneDrive.app
@sudo chmod 755 ${WORK_D}/Application/OneDrive.app
@sudo chown root:wheel ${WORK_D}/Application/OneDrive.app

pack-OneDriveConfiguration: l_usr_local_bin
@sudo ${CP} ./OneDriveConfiguration.app.tar.bz2 ${WORK_D}/Application/OneDriveConfiguration.app
@sudo chmod 755 ${WORK_D}/Application/OneDriveConfiguration.app
@sudo chown root:wheel ${WORK_D}/Application/OneDriveConfiguration.app

When trying to run make pkg I get make: *** No rule to make target `pkg'.  Stop.

Any ideas? 

Thanks

Jason Content, 

Kris Lou

unread,
Feb 19, 2016, 3:13:29 PM2/19/16
to the-l...@googlegroups.com

On Fri, Feb 19, 2016 at 4:29 AM, Jason Content <jasonc...@gmail.com> wrote:
PAYLOAD=OneDrive.app.tar.bz2\
OneDriveConfiguration.app.tar.bz2


The PAYLOAD is not necessarily the items to be included, but rather a series of commands telling what to do.  With your definitions, it should be something like:

PAYLOAD=\
   pack-OneDrive \
   pack-OneDriveConfiguration


pack-OneDrive: l_usr_local_bin
@sudo ${CP} ./OneDrive.app.tar.bz2 ${WORK_D}/Application/OneDrive.app
@sudo chmod 755 ${WORK_D}/Application/OneDrive.app
@sudo chown root:wheel ${WORK_D}/Application/OneDrive.app

pack-OneDriveConfiguration: l_usr_local_bin
@sudo ${CP} ./OneDriveConfiguration.app.tar.bz2 ${WORK_D}/Application/OneDriveConfiguration.app
@sudo chmod 755 ${WORK_D}/Application/OneDriveConfiguration.app
@sudo chown root:wheel ${WORK_D}/Application/OneDriveConfiguration.app

Jason Content

unread,
Feb 20, 2016, 9:47:19 AM2/20/16
to The Luggage
Hey thanks for getting back to me, 

I made the changes you recommended and now I get a weird error and I cant work out why. 

make -f Makefile -e pack-OneDrive pack-OneDriveConfiguration

cp: /tmp/the_luggage/OneDrivePkg-20160220/root/Application/OneDrive.app: No such file or directory

make[1]: *** [pack-OneDrive] Error 1

make: *** [payload] Error 2


any ideas? 


Thanks

Joseph Chilcote

unread,
Feb 20, 2016, 11:07:25 AM2/20/16
to the-l...@googlegroups.com
Hi Jason.  Luggage has support for making packages straight from a bzip2 compressed tar file.  see https://github.com/unixorn/luggage/wiki#creating-a-package-for-a-gui-application

Should should work for you:

USE_PKGBUILD=1
include /usr/local/share/luggage/luggage.make
TITLE=OneDrivePkg
REVERSE_DOMAIN=com.grahamgilbert
PAYLOAD=\
unbz2-applications-OneDrive.app \
unbz2-applications-OneDriveConfiguration.app



Cheers,

--joe

--
You received this message because you are subscribed to the Google Groups "The Luggage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to the-luggage...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kris Lou

unread,
Feb 20, 2016, 1:45:42 PM2/20/16
to the-l...@googlegroups.com

USE_PKGBUILD=1
include /usr/local/share/luggage/luggage.make
TITLE=OneDrivePkg
REVERSE_DOMAIN=com.grahamgilbert

Change REVERSE_DOMAIN to match yours.

I also like to add PACKAGE_VERSION=x.xx.  Otherwise, the resulting package will be datestamped instead of versioned.  Your choice.
 
pack-OneDrive: l_usr_local_bin

This lists l_usr_local_bin as a dependency, meaning that you're going to be using /usr/local/bin as a destination (or intermediary) location.  Instead, I think that you'd want "l_Applications".  Check the luggage.make file (included above) for other included locations, and also shortcuts for already "supported" locations and functions.
 
@sudo ${CP} ./OneDrive.app.tar.bz2 ${WORK_D}/Application/OneDrive.app

This copies OneDrive.app.tar.bz2 (assuming it exists relative to your Makefile location) to /Application/OneDrive.app, assuming that you have the destination location defined (p.s. ApplicationS?).  But it's just copying and renaming the *.tar.bz2 as *.app, not doing any extraction.

As Joe mentioned, look at unbz2-applications-xxx as it'll likely do exactly what you want.  Within the luggage.make file, you can trace exactly what it does and which locations it defines/touches.  Anything not listed there needs to be defined in your specific Makefile.  https://github.com/unixorn/luggage/blob/master/luggage.make#L1009

HTH,

Steve Yuroff

unread,
Feb 21, 2016, 11:20:46 PM2/21/16
to the-l...@googlegroups.com
I know I'm on the-luggage list, but I'm going to suggest munki-pkg as a simpler route:  

-munkipkg make MyAwesomeOneDriveInstaller

in the Payloads folder, make an Applications folder.  Drop your apps in it.  Edit build-info.plist as needed.  

munkipkg MyAwesomeOneDriveInstaller

Ding, installer is done.

I have all respect for the Luggage, but we're blessed to live in a world with multiple means to the same end.  You might find munki-pkg as the better tool for the job.

--

Ryan Manly

unread,
Feb 22, 2016, 9:23:01 AM2/22/16
to the-l...@googlegroups.com
As an aside if you are still having problems…

It looks from the pasted code that you *may* have differing types of indents.

make wants real tabs.

If you are a vim user throwing this in your .vimrc can help.

"Syntax of these languages is fussy over tabs vs. spaces
autocmd FileType make setlocal ts=8 sts=0 sw=8 noexpandtab
autocmd FileType yaml setlocal ts=2 sts=0 sw=2 expandtab

Reply all
Reply to author
Forward
0 new messages