# Compiler to use
-# CXX = g++
-
-
-# Thread-related flags
-# On some compilers -pthreads
-CXXFLAGS_PTHREAD = -pthread
-
-# Comment out CXXFLAGS line below to disable pthread semantics in code
-CXXFLAGS_PTHREAD += -D_POSIX_PTHREAD_SEMANTICS
-
-LDLIBS_PTHREAD = -lpthread
-
-
-# Optimization flags
-CXXFLAGS = -O2
-
-#CXXFLAGS += -g -Wall
-#CXXFLAGS += -ansi
-#CXXFLAGS += -pedantic
-#CXXFLAGS += -std=c++0x
-
-# Comment out CXXFLAGS line below for compatability mode for 32bit file sizes
+CC = g++
+CFLAGS ?= -O2
+#CFLAGS += -g -Wall
+#CFLAGS += -ansi
+#CFLAGS += -pedantic
+#CFLAGS += -std=c++0x
+
+# Comment out CFLAGS line below for compatability mode for 32bit file sizes
# (less than 2GB) and systems that have compilers that treat int as 64bit
# natively (ie: modern AIX)
CXXFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
# External libraries
-LDLIBS = -lbz2
-LDLIBS += $(LDLIBS_PTHREAD)
-
+LDFLAGS += -lbz2
+LDFLAGS += -lpthread
# Where you want pbzip2 installed when you do 'make install'
PREFIX = /usr
--- /dev/null
+* Sat May 11 2013 Anas Nashif <anas.nashif@intel.com> submit/tizen/20130509.182756@e5e5aeb
+- Set license using %license
+
+* Tue Mar 05 2013 Patrick McCarty <patrick.mccarty@linux.intel.com> upstream/1.1.6@16bd24b
+- Add packaging
+- Avoid overwriting CFLAGS and LDFLAGS
+- Imported Upstream version 1.1.6
+
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
--- /dev/null
+Name: pbzip2
+Version: 1.1.6
+Release: 0
+Summary: Parallel implementation of bzip2
+URL: http://www.compression.ca/pbzip2/
+License: BSD
+Group: Applications/Other
+Source0: %{name}-%{version}.tar.gz
+Source1001: pbzip2.manifest
+BuildRequires: bzip2-devel
+BuildRequires: gcc-c++
+
+%description
+PBZIP2 is a parallel implementation of the bzip2 block-sorting file
+compressor that uses pthreads and achieves near-linear speedup on SMP
+machines. The output of this version is fully compatible with bzip2
+v1.0.2 or newer (ie: anything compressed with pbzip2 can be
+decompressed with bzip2).
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%build
+make %{?_smp_mflags}
+
+%install
+install -Dm755 pbzip2 %{buildroot}%{_bindir}/pbzip2
+install -Dm644 pbzip2.1 %{buildroot}%{_mandir}/man1/pbzip2.1
+ln -s pbzip2 %{buildroot}%{_bindir}/pbunzip2
+ln -s pbzip2 %{buildroot}%{_bindir}/pbzcat
+
+%docs_package
+
+%files
+%manifest %{name}.manifest
+%license COPYING
+%{_bindir}/pbzip2
+%{_bindir}/pbunzip2
+%{_bindir}/pbzcat