{"id":2153,"date":"2015-12-14T00:30:21","date_gmt":"2015-12-14T06:30:21","guid":{"rendered":"http:\/\/dev.iachieved.it\/iachievedit\/?p=2153"},"modified":"2015-12-22T11:24:30","modified_gmt":"2015-12-22T17:24:30","slug":"ubuntu-14-04-package-for-open-source-swift-2-2","status":"publish","type":"post","link":"https:\/\/dev.iachieved.it\/iachievedit\/ubuntu-14-04-package-for-open-source-swift-2-2\/","title":{"rendered":"Ubuntu 14.04 Package for Open Source Swift 2.2"},"content":{"rendered":"<p>Ubuntu 15.10 and 14.04 instructions are now available <a href=\"http:\/\/dev.iachieved.it\/iachievedit\/ubuntu-packages-for-open-source-swift\/\">here<\/a>!<\/p>\n<p>Quick and easy instructions for installing Open Source Swift 2.2 on Ubuntu 14.04 using <code>apt-get<\/code>.<\/p>\n<p><b>1.  Add the repository key<\/b><\/p>\n<pre class=\"crayon:false\">\r\nwget -qO- http:\/\/dev.iachieved.it\/iachievedit.gpg.key | sudo apt-key add -\r\n<\/pre>\n<p><b>2.  Add the repository to <code>sources.list<\/code><\/b><\/p>\n<pre class=\"crayon:false\">\r\necho \"deb http:\/\/iachievedit-repos.s3.amazonaws.com\/ trusty main\" | sudo tee --append \/etc\/apt\/sources.list\r\n<\/pre>\n<p><b>3.  Run <code>apt-get update<\/code><\/b><\/p>\n<pre class=\"crayon:false\">\r\nsudo apt-get update\r\n<\/pre>\n<p><b>4.  Install swift-2.2!<\/b><\/p>\n<pre class=\"crayon:false\">\r\napt-get install swift-2.2\r\n<\/pre>\n<p>I am currently serving this package off of Amazon S3 so it may take a bit to download.  I am looking at whether or not I can afford utilizing CloudFront.<\/p>\n<p><b>5.  Try it out<\/b><\/p>\n<pre class=\"crayon:false\">\r\ngit clone https:\/\/github.com\/apple\/example-package-dealer\r\ncd example-packager-dealer\r\nswift build\r\nCompiling Swift Module 'FisherYates' (1 sources)\r\nLinking Library:  .build\/debug\/FisherYates.a\r\nCompiling Swift Module 'PlayingCard' (3 sources)\r\nLinking Library:  .build\/debug\/PlayingCard.a\r\nCompiling Swift Module 'DeckOfPlayingCards' (1 sources)\r\nLinking Library:  .build\/debug\/DeckOfPlayingCards.a\r\nCompiling Swift Module 'Dealer' (1 sources)\r\nLinking Executable:  .build\/debug\/Dealer\r\n<\/pre>\n<p>Run it!<\/p>\n<pre class=\"crayon:false\">\r\n.build\/debug\/Dealer\r\n<\/pre>\n<h2>FAQ<\/h2>\n<p><b>Q.<\/b>  Did Apple build these binaries?<br \/>\n<b>A.<\/b>  No, I built them on my personal server using the instructions I posted <a href=\"http:\/\/dev.iachieved.it\/iachievedit\/keeping-up-with-open-source-swift\/\">here<\/a>.<\/p>\n<p><b>Q.<\/b>  What git revisions are included in the build?<br \/>\n<b>A.<\/b>  You can use <code>apt-cache show swift-2.2<\/code> to see this information.  For example:<\/p>\n<pre class=\"crayon:false\">\r\n# apt-cache show swift-2.2\r\nPackage: swift-2.2\r\nVersion: 1:2.2-0ubuntu4~trusty1\r\nArchitecture: amd64\r\nMaintainer: iachievedit (support@iachieved.it)\r\nDepends: clang-3.6, libicu-dev\r\nHomepage: http:\/\/dev.iachieved.it\/iachievedit\/swift\r\nPriority: optional\r\nSection: development\r\nFilename: pool\/main\/s\/swift-2.2\/swift-2.2_2.2-0ubuntu4~trusty1_amd64.deb\r\nSize: 60218098\r\nSHA256: 69d5c38c97fd748af7829cb4c00d51539d0e6c21de9740754d2fa0da71c1bb8e\r\nSHA1: 5872fb2a9c06cc4461d4a26eb9c4350e3b89ac1a\r\nMD5sum: 87e12231e38a75e9126855b803daa4fd\r\nDescription: Open Source Swift\r\n This is a packaged version of Open Source Swift 2.2 built from\r\n the following git revisions of the Apple Github repositories:\r\n       Clang:  f66c5bb67b\r\n        LLVM:  7bae82deaa\r\n       Swift:  23366f2001\r\n  Foundation:  0b6479b664\r\nDescription-md5: 1c037ae5d6761bd55f026676773e5e30\r\n\r\n<\/pre>\n<p>The source tree is <i>untouched<\/i> for each build.<\/p>\n<p><b>Q.<\/b>  Do you test the binaries before you upload them?<br \/>\n<b>A.<\/b>  The Swift build process tests the resulting binaries, and I then do run some basic tests and compile my own applications, but there is currently no separate exhaustive test suite.<\/p>\n<p><b>Q.<\/b>  Are you releasing builds on a set schedule?<br \/>\n<b>A.<\/b>  Not really, though I may try to stay in sync with the releases from Apple.  The idea was to get something out for folks to experiment with and start coding Swift on Linux.<\/p>\n<p><b>Q.<\/b>  Where is everything installed?<br \/>\n<b>A.<\/b>  Everything gets put in <code>\/usr<\/code>, just like installing <code>clang<\/code>, <code>gcc<\/code>, etc.<\/p>\n<p><b>Q.<\/b>  How do I decipher the package version number?<br \/>\n<b>A.<\/b>  This was my first take on what I thought should be an appropriate package version number.  Breaking it down, <code>2.2-0ubuntu3~trusty1<\/code> should be:<\/p>\n<ul>\n<li>2.2 is the version of Swift that is packaged\n<li>-0ubuntu3 indicates that this is the 3rd package for Ubuntu, with the 0 indicating that there is no upstream Debian package upon which this package was based\n<li>~trusty1 indicates that this package is for Trusty Tahr\n<\/ul>\n<p>I <i>think<\/i> I got that right, but if you feel otherwise please do drop me a line at <code>support@iachieved.it<\/code>.  <\/p>\n<h2>How Does This Work?<\/h2>\n<p>I used <a href=\"http:\/\/xn.pinkhamster.net\/blog\/tech\/host-a-debian-repository-on-s3.html\">these awesome instructions<\/a> on how to host a Debian package repository on Amazon S3.  I tried to set up a Launchpad PPA, but quite frankly, got tired of trying to wade through all the metadata required to put together a simple package.  I&#8217;m sure for hosting distribution repositories it&#8217;s all required, but for this it felt like overkill.  The folks that develop <a href=\"https:\/\/github.com\/jordansissel\/fpm\">fpm<\/a> also have some choice things to say about it.<\/p>\n<p>In addition I&#8217;ll be submitting the other bits on how to package and upload to Github.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu 15.10 and 14.04 instructions are now available here! Quick and easy instructions for installing Open Source Swift 2.2 on Ubuntu 14.04 using apt-get. 1. Add the repository key wget -qO- http:\/\/dev.iachieved.it\/iachievedit.gpg.key | sudo apt-key add &#8211; 2. Add the repository to sources.list echo &#8220;deb http:\/\/iachievedit-repos.s3.amazonaws.com\/ trusty main&#8221; | sudo tee &#8211;append \/etc\/apt\/sources.list 3. Run [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,19,5],"tags":[],"class_list":["post-2153","post","type-post","status-publish","format-standard","hentry","category-apple","category-linux","category-swift"],"_links":{"self":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts\/2153"}],"collection":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/comments?post=2153"}],"version-history":[{"count":23,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts\/2153\/revisions"}],"predecessor-version":[{"id":2212,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts\/2153\/revisions\/2212"}],"wp:attachment":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/media?parent=2153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/categories?post=2153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/tags?post=2153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}