How to create .deb packages on Mac OS X - macos

I am trying to upload my app on Cydia and it requires .deb package. I am unable to figure out how to make .deb packages on mac. I am using 10.6.3 when I write this command on terminal
dpkg-deb -b MyProgram
Terminal output is
-bash: dpkg-deb: command not found
I've install fink, Mac ports insert Mac DVD to find out but nothing helps.

It's available on Homebrew:
brew install dpkg
If you don't have Homebrew installed, go to brew.sh. It's a simple one-liner to install.
Homebrew is less invasive, less complicated, and more popular than Macports or similar.

I installed mac ports 1.7 through terminal as no package is available.
After that I installed Mac ports 1.9 through installer.
Then goto this path /opt/local/bin and run sudo port selfupdate
after that execute sudo port install dpkg
it will take some time and after that your dpkg is successfully configured.
Run this command sudo dpkg-deb -b MyProgram to make MyProgram.deb
Note MyProgram should contain DEBIAN folder and under that control file remove txt extention
Below is control file
Website: www.zeeshanullah.com
Maintainer: zeeshanullah <zzeeshann#gmail.com>
Name: Snapture
Package: zeeshanullah
Section: zeeshanullah
Version: 2.x.x
Architecture: iphoneos-arm
Description: GPS joke.
Sponsor: zeeshanullah.com <zeeshanullah>
dont forget to place a new line at the end of control file otherwise you will get an error.

You need Xcode installed on your system before using mac ports - you find it on the second mac DVD, I think. After that, you can install mac ports and then via the Terminal type "sudo port install dpkg", press return and enter your password. It may take some time to compile. You tried that?

Best option is to use FPM and you can create it in 50 secs:
fpm

i think these links can be useful for you:
How to make a deb on mac
Using ant to create deb

Related

Why can't I setup an SSHFS share? “OSXFUSE file system is not available” error

I'm trying to setup an SSHFS share from my local machine to a remote machine, but it is not working. I'm getting the error OSXFUSE file system is not available (see below). How to fix this??
FYI, my local machine is a MacBook Pro laptop running OSX 10.9.3. The remote machine is actually a VirtualBox on the same hardware running CentOS.
% brew install sshfs # <---- SSHFS is installed
Warning: sshfs-2.5.0 already installed
% brew install osxfuse # <---- OSX Fuse is installed
Warning: osxfuse-2.6.4 already installed
% ssh remote_user#XXX.XXX.XXX.XXX # <---- See, SSH works!!
Last login: Wed Jun 18 18:36:11 2014 from XXX.XXX.XXX.XXX
[remote_user#XXX.XXX.XXX.XXX ~]% exit
% sudo mkdir /mnt
% sudo mkdir /mnt/Share
% sudo sshfs -o IdentityFile=~/.ssh/id_rsa.pub remote_user#XXX.XXX.XXX.XXX:/ /mnt/Share
the OSXFUSE file system is not available (-1)
the OSXFUSE file system is not available (1)
I tried solution described here. But it didn't work for me:
% sudo kextunload -b com.github.osxfuse.filesystems.osxfusefs
(kernel) Kext com.github.osxfuse.filesystems.osxfusefs not found for unload request.
Failed to unload com.github.osxfuse.filesystems.osxfusefs - (libkern/kext) not found.
If you run brew info osxfuse and follow the instructions to the letter, I believe it would work.
From what You described, you just tried unloading the (possible) previous kernel extension, but did not complete the last important step to actually install the new extension.
This is what brew info osxfuse tells me:
If upgrading from a previous version of osxfuse, the previous kernel extension
will need to be unloaded before installing the new version. First, check that
no FUSE-based file systems are running:
mount -t osxfusefs
Unmount all FUSE file systems and then unload the kernel extension:
sudo kextunload -b com.github.osxfuse.filesystems.osxfusefs
The new osxfuse file system bundle needs to be installed by the root user:
sudo /bin/cp -RfX /usr/local/opt/osxfuse/Library/Filesystems/osxfusefs.fs /Library/Filesystems
sudo chmod +s /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs
There appears to be a problem loading the KEXT installed by the regular osxfuse Homebrew package. You can use brew cask to install the official FUSE for OS X build from their own DMG:
brew rm osxfuse
brew install caskroom/cask/brew-cask
brew cask install osxfuse
SSHFS itself is also available as a Cask package, though on my system mixing osxfuse from Cask with plain sshfs binary bottle works just fine.
The downside to this approach is that brew upgrade or brew outdated will no longer be able to update FUSE for OS X as brew cask is not version-aware for now.
I have observed that OSXFUSE is a bit tricky, though I don't know exactly why, and brew tries to avoid changing the system, so using it to manage kernel extensions is not a good idea. I suggest using the packaged installers for OSXFUSE and SSHFS from http://osxfuse.github.io/ instead of using brew.
Open System Preferences, choose FUSE, then update to the latest version. Thats what worked for me.
The problem when installing SSHFS with brew is that osxfusefs is not signed: the Console outputs com.apple.kextd: ERROR: invalid signature for com.github.osxfuse.filesystems.osxfusefs, will not load. See also https://github.com/osxfuse/osxfuse/issues/122.
The binary for OSXFUSE from http://osxfuse.github.io/ (as suggested by the answer of Old Pro) does not have this problem, and therefore installing this one instead resolved it for me.

Setup Macports on an offline machine

I need to install dpkg for my mac and the easiest way I have seen for doing that is to install Macports. Unfortunately the machine I want to install it on is not connected to the internet.
Is there a way to download dpkg and its dependencies for macports and install the packages on the offline machine?
I have seen people mention to set it up on an online machine and move the whole macports folder, however the only machine I have online is running a different OSX version which could cause issues.
Thanks in advance.
You could try to download all sourcefiles using
sudo port fetch rdepof:dpkg
and then copy everything in (/opt/local/var/macports/distfiles/) to the offline machine and put it in the same folder there.
Then you should be able to build dpkg using
sudo port install -s dpkg
The -s option forces macports to build from source. (Prevent MacPorts from installing pre-built package?)

How can I install qpdf on Mac 10.8.3?

When running R CMD check on packages on a Mac build server, I'm getting a warning
‘qpdf’ is needed for checks on size reduction of PDFs
I can't seem to get qpdf installed and on the system. I tried installing via the fink package manager, but according to the package database (http://pdb.finkproject.org/pdb/package.php/qpdf), qpdf doesn't seem to have been built since osx 10.6, and I'm on 10.8.3.
Can anyone point me to qpdf mac install or build instructions? Or is there a way to disable the warning when checking R packages?
This is somewhat related to the question qpdf.exe for compactPDF?, although they were on a windows machine and I'm on a mac.
You can install qpdf with homebrew:
brew install qpdf
MacPorts can help you. Download MacPorts from http://www.macports.org/ and run sudo port install qpdf.

How to install libuuid on Mac OS X?

I'm trying to compile gearman-0.28 on Mac, but encountered the following error:
configure: error: Unable to find libuuid
I don't know how to install libuuid on Mac, my Mac is 10.7.2 version.
Any one can help me? Thanks in advance.
With Homebrew:
brew install ossp-uuid
For those who are trying to install the uuid extension from PECL, the ossp-uuid and the util-linux's uuid package shipped with Mac OSX will not work as they are out dated. You will need an updated version of uuid from util-linux. It is available on Homebrew.
brew install util-linux
But util-linux is a keg-only package and will not be symlinked to /usr/local. Hence you will have to specify the following path when prompted for uuid installation directory
/usr/local/opt/util-linux
For unattended installations, you can use
printf "/usr/local/opt/util-linux" | pecl install uuid
Install mac port like
sudo port install ossp-uuid
$configure --with-lib
As time goes by, it seems worthwhile to mention that libuuid has become part of macOS in the meantime.
If you want an up to date alternative to the brew or mac ports solutions, the following from here works great. You can also add the code to your .zshrc or .bash_profile
$ alias uuid="python -c 'import sys,uuid; sys.stdout.write(uuid.uuid4().hex)' | pbcopy && pbpaste && echo"
$ uuid
34469137412242129cd908e384717794

mac ports - progress option?

I am install gedit on my Mac via macports. I ran the following command,
sudo port install gedit
There are MANY dependencies for gedit, and macports has been downloading/installing them for the last 2 hours. Is there a command line option for it to show progress as it's downloading, building, and installing each individual package?
may be you need to edit /opt/local/share/macports/Tcl/port1.0/portfetch.tcl,
change 'curl' to another program for example axel or wget and then redirect to your current TTY,you can also use 'tty' command to get the current TTY

Resources