Skip to content

Commit 3a81bae

Browse files
committed
merge with SynoCommunity
1 parent 51d59c3 commit 3a81bae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+3268
-1270
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
21
distrib
32
packages
43
native/*/work*
54
cross/*/work*
65
spk/*/work*
76
toolchains/*/work*
87
local.mk
9-
*/DS_Store
8+
*.DS_Store
9+
*~

README.md

+24-8
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,42 @@
11
SPKSRC
2-
=====
2+
======
33

44
*SPKSRC is currently in alpha stage. All dependencies do not work correctly.*
55

6-
SPKSRC is a cross compilation framework intended to compile sfotware for the Synology's NAS.
6+
SPKSRC is a cross compilation framework intended to compile and package softwares for the Synology's NAS.
77

8-
## Usage
9-
To build an spk, cd to the corresponding folder in spk/, and type make ARCH=<your arch>. The list of supported architecture is found in toolchains/ (note that the syno- prefix shall not be added).
8+
Usage
9+
-----
1010

11-
Files will be downloaded in distrib, and packages will placed in packages.
11+
### Choose your ARCH
12+
You can list all available archs with `ls toolchains`. Remove the prefix `syno-` to have the actual ARCH.
13+
14+
### Build a SPK
15+
You can list all available SPKs with `ls spk`.
16+
17+
* `make ARCH=yourarch yourspk-clean` to clean previous builds
18+
* `make ARCH=yourarch yourspk` to make the SPK
19+
* in your spk directory : `make all-archs` to make the spk for all available archs
20+
21+
Required files for cross-compilation are downloaded in `distrib` directory.
22+
Built SPKs are stored in `packages` directory.
23+
24+
25+
TODO
26+
----
1227

13-
## Todo
1428
* Add more software
1529
* Do some more clean up in mk/
1630
* Add generic support for DSM integration
1731
* Add support for custom package server upload
1832
* Add support for download validation (check hash on downloaded files)
1933

20-
## Bugs
21-
If you find a bug please report it or it'll never get fixed. Verify that it hasn't [already been submitted][googleissues] and then [log a new bug][googlenewissue]. Be sure to provide as much information as possible.
34+
Bugs
35+
----
36+
If you find a bug please report it in the [issue tracker][issuetracker] if it has not already been reported. Be sure to provide as much information as possible.
2237

2338
## License
2439
When not explicitly set, files are placed under a [3 clause BSD license][bsd3clause].
2540

2641
[bsd3clause]: http://www.opensource.org/licenses/BSD-3-Clause
42+
[issuetracker]: https://github.com/SynoCommunity/spksrc/issues

cross/ncurses/Makefile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
3+
PKG_NAME = ncurses
4+
PKG_VERS = 5.9
5+
PKG_EXT = tar.gz
6+
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
7+
PKG_DIST_SITE = http://ftp.gnu.org/pub/gnu/$(PKG_NAME)
8+
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
9+
10+
DEPENDS =
11+
12+
MAINTAINER = [email protected]
13+
HOMEPAGE = http://www.gnu.org/s/readline
14+
COMMENT = The Ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, and more.
15+
LICENSE = http://www.gnu.org/licenses/gpl.html
16+
17+
GNU_CONFIGURE = 1
18+
CONFIGURE_ARGS = --with-shared --enable-rpath --enable-overwrite
19+
20+
include ../../mk/spksrc.cross-cc.mk

cross/ncurses/PLIST

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
lnk:bin/captoinfo
2+
bin:bin/clear
3+
lnk:bin/infocmp
4+
bin:bin/infotocap
5+
rsc:bin/ncurses5-config
6+
lnk:bin/reset
7+
bin:bin/tabs
8+
bin:bin/tic
9+
bin:bin/toe
10+
bin:bin/tput
11+
bin:bin/tset
12+
lnk:lib/libform.so
13+
lnk:lib/libform.so.5
14+
lib:lib/libform.so.5.9
15+
lnk:lib/libmenu.so
16+
lnk:lib/libmenu.so.5
17+
lib:lib/libmenu.so.5.9
18+
lnk:lib/libncurses.so
19+
lnk:lib/libncurses.so.5
20+
lib:lib/libncurses.so.5.9
21+
lnk:lib/libpanel.so
22+
lnk:lib/libpanel.so.5
23+
lib:lib/libpanel.so.5.9
24+
rsc:share/tabset

cross/openssl/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ include ../../mk/spksrc.cross-cc.mk
2424

2525
.PHONY: myConfigure
2626
myConfigure:
27-
$(RUN) ./Configure --openssldir=$(INSTALL_PREFIX) linux-generic32 shared
27+
$(RUN) ./Configure --openssldir=$(INSTALL_PREFIX) linux-generic32 zlib-dynamic shared threads
2828

2929

3030
.PHONY: myInstall

cross/openssl/PLIST

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ lnk:lib/libcrypto.so
22
lib:lib/libcrypto.so.1.0.0
33
lnk:lib/libssl.so
44
lib:lib/libssl.so.1.0.0
5+
rsc:openssl.cnf
6+
bin:bin/openssl

cross/pip/Makefile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
3+
PKG_NAME = pip
4+
PKG_VERS = 1.0.2
5+
PKG_EXT = tar.gz
6+
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
7+
PKG_DIST_SITE = http://pypi.python.org/packages/source/p/$(PKG_NAME)/
8+
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
9+
10+
DEPENDS = cross/setuptools
11+
12+
MAINTAINER = http://packages.nas-forum.com
13+
HOMEPAGE = http://pypi.python.org/pypi/pip
14+
COMMENT = pip installs packages. Python packages.
15+
LICENSE =
16+
17+
ADDITIONAL_CFLAGS =
18+
CONFIGURE_ARGS =
19+
20+
21+
include ../../mk/spksrc.python-module.mk

cross/pip/PLIST

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bin:bin/pip

cross/python26/Makefile

+13-1
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,26 @@ PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT)
77
PKG_DIST_SITE = http://www.python.org/ftp/python/$(PKG_VERS)
88
PKG_DIR = Python-$(PKG_VERS)
99

10-
DEPENDS = cross/zlib cross/openssl cross/sqlite
10+
DEPENDS = cross/zlib cross/openssl cross/sqlite cross/readline
1111
DEPENDS += native/$(PKG_NAME)
1212

1313
MAINTAINER = [email protected]
1414
HOMEPAGE = http://www.python.org/
1515
COMMENT = Python Programming Language
1616
LICENSE =
1717

18+
# Patch
19+
POST_PATCH_TARGET = pyPostPatch
20+
21+
# Configure
1822
GNU_CONFIGURE = 1
1923
ADDITIONAL_CFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
2024
CONFIGURE_ARGS = --enable-ipv6
2125

26+
# Compile
2227
COMPILE_TARGET = myCompile
28+
29+
# Install
2330
INSTALL_TARGET = myInstall
2431
POST_INSTALL_TARGET = $(WORK_DIR)/python-cc.mk
2532

@@ -31,12 +38,17 @@ HOSTPGEN_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/$(PKG_DIR)
3138
HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython
3239
HOSTPGEN = $(WORK_DIR)/$(PKG_DIR)/hostpgen
3340

41+
pyPostPatch:
42+
$(RUN) sed -e 's#@INSTALL_PREFIX@#$(INSTALL_PREFIX)#' -i Lib/mimetypes.py
43+
3444
myCompile:
3545
cp $(HOSTPYTHON_NATIVE) $(HOSTPYTHON)
3646
cp $(HOSTPGEN_NATIVE) $(HOSTPGEN)
3747
$(RUN) $(MAKE) HOSTPYTHON=$(HOSTPYTHON) HOSTPGEN=$(HOSTPGEN) CROSS_COMPILE_TARGET=yes
3848

3949
myInstall:
50+
@install -m 755 -d $(STAGING_INSTALL_PREFIX)/etc
51+
@install -m 644 src/mime.types $(STAGING_INSTALL_PREFIX)/etc/
4052
$(RUN) $(MAKE) HOSTPYTHON=$(HOSTPYTHON) HOSTPGEN=$(HOSTPGEN) CROSS_COMPILE_TARGET=yes install prefix=$(STAGING_INSTALL_PREFIX)
4153

4254
$(WORK_DIR)/python-cc.mk: Makefile

cross/python26/PLIST

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
bin:bin/python
2+
rsc:etc/mime.types
23
rsc:lib/python2.6
34
lib:lib/python2.6/lib-dynload/*.so
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--- Lib/mimetypes.py.orig 2011-10-16 21:07:51.000000000 +0200
2+
+++ Lib/mimetypes.py 2011-10-16 21:07:58.000000000 +0200
3+
@@ -32,15 +32,7 @@
4+
]
5+
6+
knownfiles = [
7+
- "/etc/mime.types",
8+
- "/etc/httpd/mime.types", # Mac OS X
9+
- "/etc/httpd/conf/mime.types", # Apache
10+
- "/etc/apache/mime.types", # Apache 1
11+
- "/etc/apache2/mime.types", # Apache 2
12+
- "/usr/local/etc/httpd/conf/mime.types",
13+
- "/usr/local/lib/netscape/mime.types",
14+
- "/usr/local/etc/httpd/conf/mime.types", # Apache 1.2
15+
- "/usr/local/etc/mime.types", # Apache 1.3
16+
+ "@INSTALL_PREFIX@/etc/mime.types",
17+
]
18+
19+
inited = False

0 commit comments

Comments
 (0)